Fix double-escaping of flash messages (for real, this time)
This commit is contained in:
parent
f9e60828c7
commit
ddf1846fe1
|
@ -280,7 +280,7 @@ EOL
|
||||||
else
|
else
|
||||||
real_page = WikiReference.page_that_redirects_for(@web, @page_name)
|
real_page = WikiReference.page_that_redirects_for(@web, @page_name)
|
||||||
if real_page
|
if real_page
|
||||||
flash[:info] = "Redirected from \"#{@page_name}\".".html_safe
|
flash[:info] = "Redirected from \"#{@page_name}\"."
|
||||||
redirect_to :web => @web_name, :action => 'published', :id => real_page, :status => 301
|
redirect_to :web => @web_name, :action => 'published', :id => real_page, :status => 301
|
||||||
else
|
else
|
||||||
render(:text => "Page '#{@page_name}' not found", :status => 404, :layout => 'error')
|
render(:text => "Page '#{@page_name}' not found", :status => 404, :layout => 'error')
|
||||||
|
@ -366,11 +366,11 @@ EOL
|
||||||
if not @page_name.nil? and not @page_name.empty?
|
if not @page_name.nil? and not @page_name.empty?
|
||||||
real_page = WikiReference.page_that_redirects_for(@web, @page_name)
|
real_page = WikiReference.page_that_redirects_for(@web, @page_name)
|
||||||
if real_page
|
if real_page
|
||||||
flash[:info] = "Redirected from \"#{@page_name}\".".html_safe
|
flash[:info] = "Redirected from \"#{@page_name}\"."
|
||||||
redirect_to :web => @web_name, :action => 'show', :id => real_page, :status => 301
|
redirect_to :web => @web_name, :action => 'show', :id => real_page, :status => 301
|
||||||
else
|
else
|
||||||
flash[:info] = "Page \"#{@page_name}\" does not exist.\n" +
|
flash[:info] = "Page \"#{@page_name}\" does not exist.\n" +
|
||||||
"Please create it now, or hit the \"back\" button in your browser.".html_safe
|
"Please create it now, or hit the \"back\" button in your browser."
|
||||||
redirect_to :web => @web_name, :action => 'new', :id => @page_name
|
redirect_to :web => @web_name, :action => 'new', :id => @page_name
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
|
@ -78,11 +78,11 @@
|
||||||
<%= render(:file => 'navigation') unless @web.nil? || @hide_navigation %>
|
<%= render(:file => 'navigation') unless @web.nil? || @hide_navigation %>
|
||||||
|
|
||||||
<%- if flash[:info] -%>
|
<%- if flash[:info] -%>
|
||||||
<div class="info"><%= escape_preserving_linefeeds flash[:info] %></div>
|
<div class="info"><%= escape_preserving_linefeeds flash[:info].html_safe %></div>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
||||||
<%- if @error or flash[:error] -%>
|
<%- if @error or flash[:error] -%>
|
||||||
<div class="errorExplanation"><%= escape_preserving_linefeeds(@error || flash[:error]) %></div>
|
<div class="errorExplanation"><%= escape_preserving_linefeeds(@error || flash[:error].html_safe) %></div>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
||||||
<%= @content_for_layout %>
|
<%= @content_for_layout %>
|
||||||
|
|
Loading…
Reference in a new issue