aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/environment.rb9
-rw-r--r--lib/make_html_4_compliant.rb9
2 files changed, 10 insertions, 8 deletions
diff --git a/config/environment.rb b/config/environment.rb
index c62fffa4a..3da236c13 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -82,14 +82,6 @@ end
# Include your application configuration below
ActionController::Base.cache_store = :file_store, File.join(File.dirname(__FILE__), '../cache')
-# 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
-
# Domain for URLs (so can work for scripts, not just web pages)
ActionMailer::Base.default_url_options[:host] = MySociety::Config.get("DOMAIN", 'localhost:3000')
@@ -131,6 +123,7 @@ require 'public_body_categories.rb'
require 'timezone_fixes.rb'
require 'fcgi_fixes.rb'
require 'use_spans_for_errors.rb'
+require 'make_html_4_compliant.rb'
# XXX temp debug for SQL logging production sites
#ActiveRecord::Base.logger = Logger.new(STDOUT)
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
+