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.
$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