From f7b649f41b97f9a84a05db38255344ceba24dba7 Mon Sep 17 00:00:00 2001 From: acli Date: Sat, 14 Feb 2004 09:33:09 +0000 Subject: [PATCH] Make a reasonable suggestion for ESCAPE= if we warn about lack of it --- misc/translator/text-extract2.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/translator/text-extract2.pl b/misc/translator/text-extract2.pl index a65bd459c1..f335145fe9 100755 --- a/misc/translator/text-extract2.pl +++ b/misc/translator/text-extract2.pl @@ -107,8 +107,9 @@ sub extract_attributes ($;$) { warn "Warning: TMPL_INCLUDE in attribute" . (defined $lc? " near line $lc": '') . ": $val_orig\n"; } elsif ($val =~ /$re_tmpl_var/os && $val !~ /$re_tmpl_var_escaped/os) { + my $suggest = ($key =~ /^(?:action|archive|background|cite|classid|codebase|data|datasrc|for|href|longdesc|profile|src|usemap)$/? 'URL': 'HTML'); warn_pedantic \$pedantic_tmpl_var_use_in_nonpedantic_mode_p, - "Unescaped TMPL_VAR in attribute" + "Suggest ESCAPE=$suggest for TMPL_VAR in attribute \"$key\"" . (defined $lc? " near line $lc": '') . ": $val_orig" if $pedantic_p || !$pedantic_tmpl_var_use_in_nonpedantic_mode_p; } elsif ($val_orig !~ /^['"]/) { -- 2.39.5