aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/application_helper.rb6
-rw-r--r--app/views/layouts/default.rhtml2
-rw-r--r--config/environment.rb9
-rw-r--r--todo.txt1
4 files changed, 10 insertions, 8 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index cf0845970..d645a8b95 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,12 +1,6 @@
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
- # This was the best solution I could find to this, yeuch.
- # http://www.ruby-forum.com/topic/88857
- def stylesheet_link_tag_html4( _n )
- return stylesheet_link_tag( _n ).gsub( ' />', '>' )
- end
-
# Copied from error_messages_for in active_record_helper.rb
def foi_error_messages_for(*params)
options = params.last.is_a?(Hash) ? params.pop.symbolize_keys : {}
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml
index 8ec31ea19..6045e5f93 100644
--- a/app/views/layouts/default.rhtml
+++ b/app/views/layouts/default.rhtml
@@ -3,7 +3,7 @@
<head>
<!-- <script type="text/javascript" src="/js.js"></script> -->
<title>Freedom of Information Filer and Archive <%= @title ? "-" : "" %> <%=@title%></title>
- <%= stylesheet_link_tag_html4 'main' %>
+ <%= stylesheet_link_tag 'main' %>
</head>
<body>
<h1 id="header">Freedom of Information Filer and Archive <span id="beta">Beta</span></h1>
diff --git a/config/environment.rb b/config/environment.rb
index ade28bba0..ed71aa5d5 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -61,7 +61,16 @@ end
ActiveRecord::Errors.default_error_messages[:blank] = "must be filled in"
# Include your application configuration below
+
+# Include our own helper functions
$:.push("../rblib")
load "validate.rb"
+# 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)
+ "<#{name}#{tag_options(options.stringify_keys) if options}>"
+ end
+end
diff --git a/todo.txt b/todo.txt
index c43d3f368..b28b04f64 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,4 +1,3 @@
-Fix up how we do HTML 4.0