Project

Profile

Help

Bug #4841

closed

HTML5 serialization should suppress escaping of a script element in the XHTML namespace

Added by Michael Kay over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Serialization
Sprint/Milestone:
-
Start date:
2020-11-25
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, trunk
Fix Committed on Branch:
10, trunk
Fixed in Maintenance Release:
Platforms:

Description

The HTML serializer is suppressing escaping (e.g. of ampersand) in a script element only if the script element is in no namespace. With HTML5 serialization it should also suppress escaping when the script element is in the XHTML namespace.

Serialization 3.1 § 7.3 says "The HTML output method MUST NOT perform escaping for any text node descendant, nor for any attribute of an element node descendant, of a script or style element.", but this to be read in the context of §7.1, which says "the HTML output method will not output an element differently from the XML output method unless the element is to be serialized as an HTML element." The definition of "serialized as an HTML element" says this happens, in the case of HTML5, when the element is in no namespace or in the XHTML namespace.

Please register to edit this issue

Also available in: Atom PDF