diff options
author | Francis Irving <francis@mysociety.org> | 2009-12-03 12:45:58 +0000 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2009-12-03 12:45:58 +0000 |
commit | 73bec180d8d400fb63058862c591d32ac8767fd5 (patch) | |
tree | ccfa8a340c5e833dc9f8a1d023244ed73ef852a6 /lib/make_html_4_compliant.rb | |
parent | a782cbf5752c5e528ffd733e688ac2ce34dcce6a (diff) |
Make HTML 4 compliancy monkeypatch a proper lib
Diffstat (limited to 'lib/make_html_4_compliant.rb')
-rw-r--r-- | lib/make_html_4_compliant.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/make_html_4_compliant.rb b/lib/make_html_4_compliant.rb new file mode 100644 index 000000000..214eb9f1f --- /dev/null +++ b/lib/make_html_4_compliant.rb @@ -0,0 +1,9 @@ +# Monkeypatch! Output HTML 4.0 compliant code, using method described in this +# ticket: http://dev.rubyonrails.org/ticket/6009 + +ActionView::Helpers::TagHelper.module_eval do + def tag(name, options = nil, open = false, escape = true) + "<#{name}#{tag_options(options, escape) if options}" + (open ? ">" : ">") + end +end + |