Make sure that if an attribute contains < or >, a warning is given; these
authoracli <acli>
Sat, 14 Feb 2004 05:46:38 +0000 (05:46 +0000)
committeracli <acli>
Sat, 14 Feb 2004 05:46:38 +0000 (05:46 +0000)
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.

misc/translator/text-extract2.pl

index 77472f7..803d604 100755 (executable)
@@ -82,8 +82,10 @@ sub extract_attributes ($;$) {
        $s = $rest;
        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 $val_orig !~ /^['"]/ && (
+                       ($pedantic_p && $val =~ /[^-\.A-Za-z0-9]/s)
+                       || $val =~ /[<>]/s      # this covers $re_directive, too
+                   )
     }
     if ($s =~ /\S/s) { # should never happen
        if ($s =~ /^([^\n]*)\n/s) { # this is even worse