diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/general.yml-example | 7 | ||||
-rw-r--r-- | config/httpd.conf | 4 | ||||
-rw-r--r-- | config/initializers/single_quote_escape_workaround.rb | 31 | ||||
-rw-r--r-- | config/routes.rb | 2 |
4 files changed, 35 insertions, 9 deletions
diff --git a/config/general.yml-example b/config/general.yml-example index 5653f89bc..33e3ad5bf 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -37,7 +37,7 @@ FRONTPAGE_PUBLICBODY_EXAMPLES: 'tgq' # URLs of themes to download and use (when running rails-post-deploy # script). Earlier in the list means the templates have a higher # priority. -THEME_URLS: +THEME_URLS: - 'git://github.com/sebbacon/adminbootstraptheme.git' - 'git://github.com/sebbacon/alavetelitheme.git' @@ -157,8 +157,3 @@ VARNISH_HOST: localhost # Adding a value here will enable Google Analytics on all non-admin pages. GA_CODE: '' - -# We need to add the WDTK survey variables here, or else the deployment -# system will cry. -SURVEY_SECRET: '' -SURVEY_URL: '' diff --git a/config/httpd.conf b/config/httpd.conf index 6428a2006..36f567964 100644 --- a/config/httpd.conf +++ b/config/httpd.conf @@ -5,7 +5,7 @@ # # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org -# +# # $Id: httpd.conf,v 1.31 2009-09-02 13:05:48 matthew Exp $ # This is needed for the PHP spell checker @@ -25,7 +25,7 @@ RewriteEngine On # it. RewriteCond %{LA-U:REMOTE_USER} (.+) RewriteRule . - [E=RU:%1] -RequestHeader add X-Forwarded-User %{RU}e +RequestHeader add X-Forwarded-User %{RU}e # Old /files URL to new subdomain (as can't use Alias with passenger, # so we do it on its own domain). This is for custom admin upload diff --git a/config/initializers/single_quote_escape_workaround.rb b/config/initializers/single_quote_escape_workaround.rb new file mode 100644 index 000000000..2e713b982 --- /dev/null +++ b/config/initializers/single_quote_escape_workaround.rb @@ -0,0 +1,31 @@ +class ERB
+ module Util
+
+ if "html_safe exists".respond_to?(:html_safe)
+ def html_escape(s)
+ s = s.to_s
+ if s.html_safe?
+ s
+ else
+ Rack::Utils.escape_html(s).html_safe
+ end
+ end
+ else
+ def html_escape(s)
+ s = s.to_s
+ Rack::Utils.escape_html(s).html_safe
+ end
+ end
+
+ remove_method :h
+ alias h html_escape
+
+ class << self
+ remove_method :html_escape
+ remove_method :h
+ end
+
+ module_function :html_escape
+ module_function :h
+ end
+end
diff --git a/config/routes.rb b/config/routes.rb index a9c2c889a..34232b55b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -80,7 +80,7 @@ ActionController::Routing::Routes.draw do |map| # Use /profile for things to do with the currently signed in user. # Use /user/XXXX for things that anyone can see about that user. - # Note that /profile isn't indexe by search (see robots.txt) + # Note that /profile isn't indexed by search (see robots.txt) map.with_options :controller => 'user' do |user| user.signin '/profile/sign_in', :action => 'signin' user.signup '/profile/sign_up', :action => 'signup' |