Warn against Apache #include directive
authoracli <acli>
Wed, 18 Feb 2004 06:56:19 +0000 (06:56 +0000)
committeracli <acli>
Wed, 18 Feb 2004 06:56:19 +0000 (06:56 +0000)
misc/translator/TmplTokenizer.pm

index 4a5e5cf..bb37eaa 100644 (file)
@@ -346,6 +346,9 @@ sub _next_token_internal {
        } elsif ($it =~ /^<!/) {
            $kind = TmplTokenType::DECL;
            $kind = TmplTokenType::COMMENT if $it =~ /^<!--(?:(?!-->).)*-->/;
+           if ($kind == TmplTokenType::COMMENT && $it =~ /^<!--\s*#include/s) {
+               warn_normal "Apache #include directive found instead of HTML::Template directive <TMPL_INCLUDE>", $this->line_number_start;
+           }
        } elsif ($it =~ /^<\?/) {
            $kind = TmplTokenType::PI;
        }