Fixed spurious warning about unescaped < inside cdata
authoracli <acli>
Sat, 14 Feb 2004 09:23:34 +0000 (09:23 +0000)
committeracli <acli>
Sat, 14 Feb 2004 09:23:34 +0000 (09:23 +0000)
misc/translator/text-extract2.pl

index a00dd95..a65bd45 100755 (executable)
@@ -153,7 +153,8 @@ sub next_token_internal (*) {
     # FIXME the following (the [<\s] part) is an unreliable HACK :-(
     } elsif ($readahead =~ /^(?:[^<]|<[<\s])+/s) {     # non-space normal text
        ($kind, $it, $readahead) = (KIND_TEXT, $&, $');
-       warn "Warning: Unescaped < near line $lc_0: $it\n" if $it =~ /</s;
+       warn "Warning: Unescaped < near line $lc_0: $it\n"
+               if !$cdata_mode_p && $it =~ /</s;
     } else {                           # tag/declaration/processing instruction
        my $ok_p = 0;
        for (;;) {