[webkit-changes] [WebKit/WebKit] aff702: Escape '&' in javascript URLs for innerHTML/outerHTML

Ahmad Saleem noreply at github.com
Mon Dec 19 17:31:03 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aff702358ff43fa9220b4e72da9bc3bab8c117b7
      https://github.com/WebKit/WebKit/commit/aff702358ff43fa9220b4e72da9bc3bab8c117b7
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2022-12-19 (Mon, 19 Dec 2022)

  Changed paths:
    M LayoutTests/fast/innerHTML/javascript-url-expected.txt
    M LayoutTests/fast/innerHTML/javascript-url.html
    M Source/WebCore/editing/MarkupAccumulator.cpp

  Log Message:
  -----------
  Escape '&' in javascript URLs for innerHTML/outerHTML

Escape '&' in javascript URLs for innerHTML/outerHTML
https://bugs.webkit.org/show_bug.cgi?id=249576

Reviewed by Ryosuke Niwa.

This patch is to align WebKit with Blink / Chromium and Gecko / Firefox.

Merge - https://src.chromium.org/viewvc/blink?revision=192539&view=revision

It is to add special handling with HTML escape when serializing URL is already
implemented for quote. Added implementation to replace '&' by '&'.

* Source/WebCore/editing/MarkupAccumulator.cpp:
(MarkupAccumulator::appendQuotedURLAttributeValue): Add condition to escape "&"
* LayoutTests/fast/innerHTML/javascript-url.html: Updated
* LayoutTests/fast/innerHTML/javascript-url-expected.txt: Updated Expectations

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




More information about the webkit-changes mailing list