Un-entify our entified characters prior to entifying them so that if text
is passed through the filter repeatedly it won't continually expand the ampersands until an ugly thing remains. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1624 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -39,10 +39,18 @@ public class HTMLUtil
|
||||
{
|
||||
// this could perhaps be done more efficiently, but this function
|
||||
// is not likely to be called on large quantities of text
|
||||
// (first we turn the entified versions normal so that if text is
|
||||
// repeatedly run through this it doesn't keep changing successive
|
||||
// &'s into "&".
|
||||
text = StringUtil.replace(text, """, "\"");
|
||||
text = StringUtil.replace(text, ">", ">");
|
||||
text = StringUtil.replace(text, "<", "<");
|
||||
text = StringUtil.replace(text, "&", "&");
|
||||
text = StringUtil.replace(text, "&", "&");
|
||||
text = StringUtil.replace(text, "<", "<");
|
||||
text = StringUtil.replace(text, ">", ">");
|
||||
return StringUtil.replace(text, "\"", """);
|
||||
text = StringUtil.replace(text, "\"", """);
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user