h :: html_escape
Ruby-Language
Today, I was looking for html_escape function and found it at the above URL:
197: def html_escape(s)
198: s.to_s.gsub(/&/n, '&').gsub(/\"/n, '"').gsub(/>/n, '>').gsub(/</n, '<')
199: end
200: alias h html_escape
Ruby-Language
197: def html_escape(s)
198: s.to_s.gsub(/&/n, '&').gsub(/\"/n, '"').gsub(/>/n, '>').gsub(/</n, '<')
199: end
200: alias h html_escape
1 Comments:
Use ERB::Util::h instead, it's already there.
Post a Comment
<< Home