Permalink
Browse files

added xss_terminate plugin

  • Loading branch information...
1 parent c49f8ed commit 55939ba8fab0a4dd4aae840d4792b9dc67c415d7 @robmckinnon robmckinnon committed Jun 15, 2009
Showing with 6 additions and 2 deletions.
  1. +3 −0 .gitmodules
  2. +2 −2 app/views/layouts/_search_form.haml
  3. +1 −0 vendor/plugins/xss_terminate
View
@@ -25,3 +25,6 @@
[submodule "vendor/plugins/authlogic"]
path = vendor/plugins/authlogic
url = git://github.com/binarylogic/authlogic.git
+[submodule "vendor/plugins/xss_terminate"]
+ path = vendor/plugins/xss_terminate
+ url = git://github.com/look/xss_terminate.git
@@ -1,10 +1,10 @@
- form_tag(search_url, :method => :get) do
- = text_field_tag 'q', (@last_search_term ? sanitize(h(@last_search_term)) : ''), :size => 24
+ = text_field_tag 'q', (@last_search_term ? h(sanitize(@last_search_term)) : ''), :size => 24
= submit_tag 'Find MP'
- if flash[:not_found] && flash[:last_search_term]
%div.text.flash
- if flash[:last_search_term].strip.size < 3
= "<p>Sorry: we need more than two letters to search</p>"
- else
- = "<p>Sorry: we couldn't find a constituency or MP when we searched for <code>#{sanitize(h(flash[:last_search_term]))}</code>. If you were searching for a postcode, please go back and check the postcode you entered, and ensure you have entered a <strong>complete</strong> postcode. If you were looking for a Member you may wish to check the <a class=\"warn\" href=\"http://www.parliament.uk/directories/hciolists/alms.cfm\">alphabetical list of Members</a> instead.</p> <p>If you are an expatriate, in an overseas territory, a Crown dependency or in the Armed Forces without a postcode, this service cannot be used to find your MP.</p>"
+ = "<p>Sorry: we couldn't find a constituency or MP when we searched for <code>#{h(sanitize(flash[:last_search_term]))}</code>. If you were searching for a postcode, please go back and check the postcode you entered, and ensure you have entered a <strong>complete</strong> postcode. If you were looking for a Member you may wish to check the <a class=\"warn\" href=\"http://www.parliament.uk/directories/hciolists/alms.cfm\">alphabetical list of Members</a> instead.</p> <p>If you are an expatriate, in an overseas territory, a Crown dependency or in the Armed Forces without a postcode, this service cannot be used to find your MP.</p>"
Submodule xss_terminate added at 724aba

0 comments on commit 55939ba

Please sign in to comment.