From b1e7c95198e50186fe105c1de045c0c9df565f4c Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Sun, 17 Feb 2013 13:46:34 +0000 Subject: Mark the public body notes as html safe. --- app/views/public_body/show.rhtml | 2 +- app/views/request/new.rhtml | 52 ++++++++++++++++++++-------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml index 7110ae9dd..8fc1eadda 100644 --- a/app/views/public_body/show.rhtml +++ b/app/views/public_body/show.rhtml @@ -58,7 +58,7 @@ <% end %>  <%= _('{{text}}', :url=>new_request_to_body_url(:url_name => @public_body.url_name), :text=>_("Start"))%> <% elsif @public_body.has_notes? %> - <%= @public_body.notes_as_html %> + <%= @public_body.notes_as_html.html_safe %> <% elsif @public_body.not_requestable_reason == 'not_apply' %> <%= _('Freedom of Information law does not apply to this authority, so you cannot make a request to it.')%> diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml index f396ea9ec..c16105560 100644 --- a/app/views/request/new.rhtml +++ b/app/views/request/new.rhtml @@ -7,26 +7,26 @@ $("#typeahead_response").load("<%=search_ahead_url%>?q="+encodeURI(this.value), function() { // When following links in typeahead results, open new tab/window $("#typeahead_response a").attr("target","_blank"); - + // Update the public body site search link $("#body-site-search-link").attr("href", "http://www.google.com/#q="+encodeURI($("#typeahead_search").val())+ "+site:<%= @info_request.public_body.calculated_home_page %>"); }); })); - + }); <% @title = _("Make an {{law_used_short}} request to '{{public_body_name}}'",:law_used_short=>h(@info_request.law_used_short),:public_body_name=>h(@info_request.public_body.name)) %>

<%= _('2. Ask for Information') %>

- + <% if @existing_request %>
<% end %> @@ -37,7 +37,7 @@
- + <%=h(@info_request.public_body.name)%>
<% if @info_request.public_body.info_requests.size > 0 %> @@ -48,18 +48,18 @@
<% if @info_request.public_body.has_notes? %> -
+

<%= _('Special note for this authority!') %>

-

<%= @info_request.public_body.notes_as_html %>

+

<%= @info_request.public_body.notes_as_html.html_safe %>

<% end %> <% if @info_request.public_body.eir_only? %>

<%= _('Please ask for environmental information only') %>

-

<%= _('The Freedom of Information Act does not apply to') %> <%=h(@info_request.public_body.name)%>. +

<%= _('The Freedom of Information Act does not apply to') %> <%=h(@info_request.public_body.name)%>. <%= _('However, you have the right to request environmental - information under a different law') %> (explanation). + information under a different law') %> (explanation). <%= _('This covers a very wide spectrum of information about the state of the natural and built environment, such as:') %> @@ -79,21 +79,21 @@ <% end %>

-
+

- + <%= f.text_field :title, :size => 50, :id =>"typeahead_search" %>

- (<%= _("a one line summary of the information you are requesting, \n\t\t\te.g.") %> + (<%= _("a one line summary of the information you are requesting, \n\t\t\te.g.") %> <%= render :partial => "summary_suggestion" %>)
- +
- +
  • <%= _('Write your request in simple, precise language.') %>
  • @@ -102,35 +102,35 @@
-
+
<% fields_for :outgoing_message do |o| %>

- + <%= o.text_area :body, :rows => 20, :cols => 60 %>

<% end %> - + <% if !@user %>

- <%= raw(_('Everything that you enter on this page, including your name, + <%= raw(_('Everything that you enter on this page, including your name, will be displayed publicly on - this website forever (why?).') % [help_privacy_path+"#public_request"]) %> + this website forever (why?).') % [help_privacy_path+"#public_request"]) %> <%= raw(_('If you are thinking of using a pseudonym, please read this first.') % [help_privacy_path+"#real_name"]) %>

<% else %>

- <%= raw(_('Everything that you enter on this page + <%= raw(_('Everything that you enter on this page will be displayed publicly on - this website forever (why?).') % [help_privacy_path+"#public_request"]) %> + this website forever (why?).') % [help_privacy_path+"#public_request"]) %>

<% end %> - +

<%= raw(_(" Can I request information about myself?\n" + - "\t\t\tNo! (Click here for details)") % [help_requesting_path+"#data_protection"]) %> + "\t\t\tNo! (Click here for details)") % [help_requesting_path+"#data_protection"]) %>

- +
<%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %> <%= hidden_field_tag(:submitted_new_request, 1 ) %> @@ -140,14 +140,14 @@ <% if !@info_request.tag_string.empty? %>

- <%= f.hidden_field(:tag_string) %> Tags: <%=h @info_request.tag_string %>

<% end %> - +
<% end %> -- cgit v1.2.3