Skip to content

Commit

Permalink
Fixed bug related to remove_html in Util.pm, FogBugz case 100487.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixel committed Jul 7, 2009
1 parent 95ac9f7 commit b10ce1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/MT/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -652,10 +652,11 @@ sub decode_url {
sub remove_html {
my($text) = @_;
return '' if !defined $text; # suppress warnings
$text =~ s/(<\!\[CDATA\[(.*?)\]\]>)|(<[^>]+>)/
$text =~ s/(<\!\[CDATA\[(.*?)\]\]>)|(<(?!\?)[^>]+>)/
defined $1 ? $1 : ''
/geisx;
/geisx;
$text =~ s/<(?!\!\[CDATA\[)/&lt;/gis;

return $text;
}

Expand Down

0 comments on commit b10ce1e

Please sign in to comment.