]> git.deb.at Git - pkg/blosxom.git/commitdiff
fixing bug 1345548.
authorKevin Scaldeferri <kscaldef@users.sourceforge.net>
Fri, 25 Nov 2005 19:53:08 +0000 (19:53 +0000)
committerKevin Scaldeferri <kscaldef@users.sourceforge.net>
Fri, 25 Nov 2005 19:53:08 +0000 (19:53 +0000)
Match any instance of the word "xml" in the content type to
determine if we need to escape the content.

blosxom.cgi

index 642a2bf31cf3cc66c433836eca986755fb22eb27..9f58a6c1209ea7d218230fb6c73148292f877c03 100755 (executable)
@@ -375,7 +375,7 @@ sub generate {
       # Plugins: Story
       foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('story') and $entries = $plugin->story($path, $fn, \$story, \$title, \$body) }
       
       # Plugins: Story
       foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('story') and $entries = $plugin->story($path, $fn, \$story, \$title, \$body) }
       
-      if ($content_type =~ m{\Wxml$}) {
+      if ($content_type =~ m{\bxml\b$}) {
         # Escape <, >, and &, and to produce valid RSS
         my %escape = ('<'=>'&lt;', '>'=>'&gt;', '&'=>'&amp;', '"'=>'&quot;');  
         my $escape_re  = join '|' => keys %escape;
         # Escape <, >, and &, and to produce valid RSS
         my %escape = ('<'=>'&lt;', '>'=>'&gt;', '&'=>'&amp;', '"'=>'&quot;');  
         my $escape_re  = join '|' => keys %escape;