When you call html_escape(string) in a template, it will call the one defined in lib/action_view/template_handlers/erb.rb.
However, if you call h instead of html_escape, it will call the original method defined in the Ruby ERB library, not the on defined in action_view.
This should be properly aliased to make the two method calls identical. Here is a patch you can apply to lib/action_view/template_handlers/erb.rb if you are using actionpack 2.02:
--- erb.rb 2008-05-02 16:43:54.000000000 -0700
+++ erb_patched.rb 2008-05-02 16:44:07.000000000 -0700
@@ -7,6 +7,8 @@ class ERB
def html_escape(s)
s.to_s.gsub(/[&"><]/) { |special| HTML_ESCAPE[special] }
end
+
+ alias_method :h, :html_escape
end
end