Skip to content

Commit

Permalink
[Haml] Properly mark the Haml-modified form_tag as html-safe.
Browse files Browse the repository at this point in the history
Closes gh-86
  • Loading branch information
nex3 committed Feb 9, 2010
1 parent e3ca1ad commit 10cf8e1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/haml/helpers/xss_mods.rb
Expand Up @@ -97,6 +97,14 @@ def haml_xss_html_escape(text)

module ActionView
module Helpers
module FormTagHelper
def form_tag_with_haml_xss(*args, &block)
Haml::Util.html_safe(form_tag_without_haml_xss(*args, &block))
end
alias_method :form_tag_without_haml_xss, :form_tag
alias_method :form_tag, :form_tag_with_haml_xss
end

module TextHelper
def concat_with_haml_xss(string)
if is_haml?
Expand Down

0 comments on commit 10cf8e1

Please sign in to comment.