diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 5d9a913..8bad792 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -42,6 +42,8 @@ class WikiController < ApplicationController helper :watchers include Redmine::Export::PDF + include ActionView::Helpers::SanitizeHelper + # List of pages, sorted alphabetically and by parent (hierarchy) def index load_pages_for_index @@ -107,7 +109,7 @@ class WikiController < ApplicationController send_data(export, :type => 'text/html', :filename => filename_for_content_disposition("#{@page.title}.html")) return elsif params[:format] == 'txt' - send_data(@content.text, :type => 'text/plain', :filename => filename_for_content_disposition("#{@page.title}.txt")) + send_data(strip_tags(@content.text), :type => 'text/plain', :filename => filename_for_content_disposition("#{@page.title}.txt")) return end end diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index 723d642..f903c1e 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -47,7 +47,7 @@ <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> <% if @page.attachments.length > 0 || (@editable && authorize_for('wiki', 'add_attachment')) %> -