[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.7,1.8
Ambrose Li
acli at users.sourceforge.net
Thu Feb 12 19:19:20 CET 2004
Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31987
Modified Files:
text-extract2.pl
Log Message:
Warn about unquoted attribute values containing [^-\.a-zA-Z0-9]
Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** text-extract2.pl 12 Feb 2004 17:58:24 -0000 1.7
--- text-extract2.pl 12 Feb 2004 18:19:17 -0000 1.8
***************
*** 35,38 ****
--- 35,39 ----
# See the file "subst.pl.test1" for how the following mess is derived
# Unfortunately, inserting $re_directive's has made this even messier
+ # FIXME: The following is somehow wrong. Paul's 1st report shouldn't happen.
q{(<\/?(?:|(?:"(?:} . $re_directive . q{|[^"])*"|'(?:} . $re_directive . q{|[^'])*'|--(?:[^-]|-[^-])*--|(?:} . $re_directive . q{|[^-"'} . $etag . q{]|-[^-]))+))([} . $etag . q{])(.*)};
}
***************
*** 71,74 ****
--- 72,78 ----
$attr{+lc($key)} = [$key, $val, $val_orig, $i];
$s = $rest;
+ warn "Warning: Attribute unquoted but needs quoting"
+ . (defined $lc? " in line $lc": '') . ": $val_orig\n"
+ if $val =~ /[^-\.A-Za-z0-9]/s && $val_orig !~ /^['"]/;
}
if ($s =~ /\S/s) { # should never happen
More information about the Koha-cvs
mailing list