[webkit-changes] [WebKit/WebKit] 154fb7: XML Parser: & , < , and <⃒ should work

Frédéric Wang noreply at github.com
Mon Nov 7 02:26:20 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 154fb73e0c5be12c6ee7b3e7c54fed224e7a69c7
      https://github.com/WebKit/WebKit/commit/154fb73e0c5be12c6ee7b3e7c54fed224e7a69c7
  Author: Frédéric Wang <fred.wang at free.fr>
  Date:   2022-11-07 (Mon, 07 Nov 2022)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/support/xhtml-mathml-dtd-entity.htm
    M LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-1-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-2-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-3-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-4-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-5-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-6-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-7-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-8-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-9-expected.txt
    M Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp

  Log Message:
  -----------
  XML Parser: &, <, and <⃒ should work
https://bugs.webkit.org/show_bug.cgi?id=247417

Reviewed by Martin Robinson.

They caused parsing errors because strings produced by them were not escaped.
This is a backport of https://chromium-review.googlesource.com/c/chromium/src/+/936983

* LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/support/xhtml-mathml-dtd-entity.htm:
  Assert that the strings have the same length, otherwise we are just testing that text has expectedString as a suffix.
* LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-1-expected.txt: Update expectation now that the tests pass.
* LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-2-expected.txt: Ditto.
* LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-3-expected.txt: Ditto.
* LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-4-expected.txt: Ditto.
* LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-5-expected.txt: Ditto.
* LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-6-expected.txt: Ditto.
* LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-7-expected.txt: Ditto.
* LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-8-expected.txt: Ditto.
* LayoutTests/imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-9-expected.txt: Ditto.
* Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::getXHTMLEntity): Escape "&", "<", and "< with Combining Long Vertical Line Overlay".

Canonical link: https://commits.webkit.org/256391@main




More information about the webkit-changes mailing list