Menu

#3 HTMLFilter cannot handle erroneous HTML correctly sometimes

open
nobody
News Filter (4)
5
2007-05-13
2007-05-13
No

When there is a mismatch in opening and closing tags for HTML tags that are marked to be ignored, the net result is that the entire text of the article gets ignored! For example, consider the HTML source for the article: http://www.thenewanatolian.com/tna-26322.html There are two marquee tags, but only one of the tags is closed! Since this tag is also marked to be ignored within HTMLFilter, the entire text of the article gets ignored.

One possible fix is to clear out the ignoreFlagStack whenever certain closing tags are seen (for example, table end). This also ensures that tag mismatch errors are contained to the smallest possible scope.

Discussion


Log in to post a comment.