Better
3rd time's the charm?
This commit is contained in:
parent
ddf1846fe1
commit
364de9dbab
|
@ -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)
|
||||
|
|
|
@ -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 %>
|
||||
|
|
Loading…
Reference in a new issue