[Koha-patches] [PATCH] Unescape Comment, now that we trust Scrubber to block bad markup.

Joe Atzberger joe.atzberger at liblime.com
Fri May 23 09:40:49 CEST 2008


Obviously if we are going to allow good markup, we can't then escape it.
Documentation reference: allowed tags for comments are:
	br b i em big small strong
---
 C4/Scrubber.pm                                     |    4 ++--
 .../opac-tmpl/prog/en/modules/opac-detail.tmpl     |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/C4/Scrubber.pm b/C4/Scrubber.pm
index e8e4023..c150558 100644
--- a/C4/Scrubber.pm
+++ b/C4/Scrubber.pm
@@ -26,7 +26,7 @@ use vars qw($VERSION @ISA);
 use vars qw(%scrubbertypes $scrubbertype);
 
 BEGIN {
-	$VERSION = 0.01;
+	$VERSION = 0.02;
 	# @ISA = qw(HTML::Scrubber);
 }
 
@@ -35,7 +35,7 @@ INIT {
 		default => {},	# place holder, default settings are below as fallbacks in call to constructor
 		    tag => {},	# uses defaults
 		comment => {
-			allow   => [qw( br b i em big small )],
+			allow   => [qw( br b i em big small strong )],
 		},
 		staff   => {
 			default => [ 1 =>{'*'=>1} ],
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
index 2a67dab..baf7b35 100755
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
@@ -422,7 +422,7 @@
 			</h5>
 			<small><!-- TMPL_VAR NAME="datereviewed" --></small>
         <p>
-          <!-- TMPL_VAR NAME="review" ESCAPE="HTML" -->
+          <!-- TMPL_VAR NAME="review" ESCAPE=0 -->
 		  <a href="#" onclick="Dopop('/cgi-bin/koha/opac-review.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->&amp;reviewid=<!-- TMPL_VAR NAME="reviewid" -->');">Edit</a>
         </p></div>
 			<!-- TMPL_ELSE -->
@@ -435,7 +435,7 @@
             </h5>
 			<small><!-- TMPL_VAR NAME="datereviewed" --></small>
         <p>
-          <!-- TMPL_VAR NAME="review" ESCAPE="HTML" -->
+          <!-- TMPL_VAR NAME="review" ESCAPE=0 -->
         </p></div>
 			<!-- /TMPL_IF -->
         <!-- /TMPL_LOOP -->
-- 
1.5.5.GIT




More information about the Koha-patches mailing list