Commit 2f32d860 authored by abarth@webkit.org's avatar abarth@webkit.org

2010-08-13 Adam Barth <abarth@webkit.org>

        Fix ASSERT in XML entity parsing.  You can't advance the entity search
        if you've already discovered that your string is not an entity.

        * html/HTMLEntityParser.cpp:
        (WebCore::decodeNamedEntity):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0e45b8a1
2010-08-13 Adam Barth <abarth@webkit.org>
Fix ASSERT in XML entity parsing. You can't advance the entity search
if you've already discovered that your string is not an entity.
* html/HTMLEntityParser.cpp:
(WebCore::decodeNamedEntity):
2010-08-13 Eric Seidel <eric@webkit.org>
Unreviewed. Attempt at fixing Chromium build.
......@@ -238,8 +238,11 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U
UChar decodeNamedEntity(const char* name)
{
HTMLEntitySearch search;
while (name && search.isEntityPrefix())
while (*name) {
search.advance(*name++);
if (!search.isEntityPrefix())
return 0;
}
search.advance(';');
UChar32 entityValue = search.currentValue();
if (U16_LENGTH(entityValue) != 1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment