3rd time's the charm?
This commit is contained in:
Jacques Distler 2011-09-03 11:33:51 -05:00
parent ddf1846fe1
commit 364de9dbab
2 changed files with 3 additions and 3 deletions

View file

@ -96,7 +96,7 @@ require 'instiki_stringsupport'
# Performs HTML escaping on text, but keeps linefeeds intact (by replacing them with <br/>)
def escape_preserving_linefeeds(text)
h(text).gsub(/\n/, '<br/>').as_utf8
h(text).gsub(/\n/, '<br/>').as_utf8.html_safe
end
def format_date(date, include_time = true)

View file

@ -78,11 +78,11 @@
<%= render(:file => 'navigation') unless @web.nil? || @hide_navigation %>
<%- if flash[:info] -%>
<div class="info"><%= escape_preserving_linefeeds flash[:info].html_safe %></div>
<div class="info"><%= escape_preserving_linefeeds flash[:info] %></div>
<%- end -%>
<%- if @error or flash[:error] -%>
<div class="errorExplanation"><%= escape_preserving_linefeeds(@error || flash[:error].html_safe) %></div>
<div class="errorExplanation"><%= escape_preserving_linefeeds(@error || flash[:error]) %></div>
<%- end -%>
<%= @content_for_layout %>