app/helpers/application_helper.rb
# similar to h, but does not escape html code which is helpful for showing italisized names
# TODO - stop using this.  Trust, instead, the built-in method (in views) called #sanitize
similar to h, but does not escape html code which is helpful for showing italisized names
TODO - stop using this.  Trust, instead, the built-in method (in views) called #sanitize
similar to h but does not escape html code which is helpful for showing italisized names TODO - stop using this . Trust instead the built - in method ( in views ) called #sanitize
def hh(input)
    return nil if input.nil?
    result = input.dup.strip
    result.gsub!(/["]|&(?![\w]+;)/) do | match |
      case match
        when '&' then '&amp;'
        when '"' then '&quot;'
        else          ''
      end
    end
    result
  end
def hh ( input ) return nil if input . nil? result = input . dup . strip result . gsub! ( / ["]|&(?![ \w ]+;) / ) do | match | case match when '&' then '&amp;' when '"' then '&quot;' else '' end end result end
similar to h, but does not escape html code which is helpful for showing italisized names
TODO - stop using this.
similar to h but does not escape html code which is helpful for showing italisized names TODO - stop using this .
input
<not_specific>