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

Ambrose Li acli at users.sourceforge.net
Sat Feb 14 06:46:40 CET 2004


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

Modified Files:
	text-extract2.pl 
Log Message:
Make sure that if an attribute contains < or >, a warning is given; these
warnings aren't pedantic because (1) if it's a templating directive, it
might expand into something containing a real < and/or >, and (2) if it
contains >, the browser will close the current tag, and (3) if it contains
< and the browser knows what "SGML closed start tags" are (e.g., Mozilla),
the browser will also close the current tag.


Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** text-extract2.pl	14 Feb 2004 05:35:04 -0000	1.19
--- text-extract2.pl	14 Feb 2004 05:46:38 -0000	1.20
***************
*** 83,88 ****
  	warn "Warning: Attribute should be quoted"
  		. (defined $lc? " near line $lc": '') . ": $val_orig\n"
! 		if $pedantic_p
! 		&& $val =~ /[^-\.A-Za-z0-9]/s && $val_orig !~ /^['"]/;
      }
      if ($s =~ /\S/s) { # should never happen
--- 83,90 ----
  	warn "Warning: Attribute should be quoted"
  		. (defined $lc? " near line $lc": '') . ": $val_orig\n"
! 		if $val_orig !~ /^['"]/ && (
! 			($pedantic_p && $val =~ /[^-\.A-Za-z0-9]/s)
! 			|| $val =~ /[<>]/s	# this covers $re_directive, too
! 		    )
      }
      if ($s =~ /\S/s) { # should never happen





More information about the Koha-cvs mailing list