From 494983367c201202e1c779d4397deaa073306027 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Mon, 10 Dec 2018 00:01:46 +0100 Subject: [PATCH] =?UTF-8?q?Se=20eliminan=20las=20etiquetas=20HTML=20en=20l?= =?UTF-8?q?a=20impresi=C3=B3n=20a=20texto=20y=20se=20ajusta=20el=20formato?= =?UTF-8?q?=20de=20impresi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wiki_controller.rb | 4 +- app/views/wiki/show.html.erb | 2 +- public/themes/circlepro/images/logo_print.png | Bin 0 -> 8082 bytes .../circlepro/stylesheets/application.css | 45 ++++++++++++++++++ 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 public/themes/circlepro/images/logo_print.png 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')) %> -