fix double encoded HTML entities re sf#1372630

This commit is contained in:
Colin Kuskie 2005-12-12 06:25:31 +00:00
parent c928697449
commit 4b64a1409c
2 changed files with 4 additions and 0 deletions

View file

@ -7,6 +7,7 @@
- fix [ 1377276 ] Calendar Pop up issue
- fix [ 1376621 ] dateSubmitted not updated on posts
- fix [ 1344111 ] promote/demote swap with non-"published" assets
- fix [ 1372630 ] Syndicated encode "&" also if belong to a HTML entity
- removed server version tag appending. Could re-add as an setting later.
(along with the Style.pm header tag version number insertion).
- fixed poll's editForm so an option only showed up at the proper time.

View file

@ -156,6 +156,9 @@ sub _strip_html {
$_[0] =~ s/\&lt;/</g;
$_[0] =~ s/\&gt;/>/g;
$_[0] = WebGUI::HTML::filter($_[0], 'all');
##Unencode double encoded entities. This is usually done
##by passing XML::RSSLite an already encoded entity.
$_[0] =~ s/\&amp;(?=(#[0-9]+|#x[0-9a-fA-F]+|\w+);)/&/g;
}
}