Masato Kikuhara
en-sf****@users*****
2005年 6月 30日 (木) 17:28:22 JST
Index: affelio/apps/diary/external_blog.cgi
diff -u affelio/apps/diary/external_blog.cgi:1.3 affelio/apps/diary/external_blog.cgi:1.4
--- affelio/apps/diary/external_blog.cgi:1.3 Thu Jun 30 11:55:14 2005
+++ affelio/apps/diary/external_blog.cgi Thu Jun 30 17:28:21 2005
@@ -95,15 +95,15 @@
sub escape_html {
my $html = shift;
-
- $html =~ s/&/&/g;
- $html =~ s/['"]/"/g;
-
- if ($html =~ /</ and $html =~ />/) {
- $html =~ s/'/"/g;
- $html =~ s/&(lt|gt|quot);/&$1;/g;
+
+ if ($html =~ /</) {
+ $html =~ s/<(.*)>//g;
+ $html =~ s/&/&/g;
+ $html =~ s/&(quot|apos);/"/g;
}
+ $html =~ s/&/&/g;
+ $html =~ s/['"]/"/g;
$html =~ s/</</g;
$html =~ s/>/>/g;