[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.29,1.30

Ambrose Li acli at users.sourceforge.net
Sat Feb 14 10:33:12 CET 2004


Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6345

Modified Files:
	text-extract2.pl 
Log Message:
Make a reasonable suggestion for ESCAPE= if we warn about lack of it


Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** text-extract2.pl	14 Feb 2004 09:23:34 -0000	1.29
--- text-extract2.pl	14 Feb 2004 09:33:09 -0000	1.30
***************
*** 108,113 ****
  		. (defined $lc? " near line $lc": '') . ": $val_orig\n";
  	} elsif ($val =~ /$re_tmpl_var/os && $val !~ /$re_tmpl_var_escaped/os) {
  	    warn_pedantic \$pedantic_tmpl_var_use_in_nonpedantic_mode_p,
! 		    "Unescaped TMPL_VAR in attribute"
  		    . (defined $lc? " near line $lc": '') . ": $val_orig"
  		if $pedantic_p || !$pedantic_tmpl_var_use_in_nonpedantic_mode_p;
--- 108,114 ----
  		. (defined $lc? " near line $lc": '') . ": $val_orig\n";
  	} elsif ($val =~ /$re_tmpl_var/os && $val !~ /$re_tmpl_var_escaped/os) {
+ 	    my $suggest = ($key =~ /^(?:action|archive|background|cite|classid|codebase|data|datasrc|for|href|longdesc|profile|src|usemap)$/? 'URL': 'HTML');
  	    warn_pedantic \$pedantic_tmpl_var_use_in_nonpedantic_mode_p,
! 		    "Suggest ESCAPE=$suggest for TMPL_VAR in attribute \"$key\""
  		    . (defined $lc? " near line $lc": '') . ": $val_orig"
  		if $pedantic_p || !$pedantic_tmpl_var_use_in_nonpedantic_mode_p;





More information about the Koha-cvs mailing list