From 257b14b634773f52e0e0b370b1a54982e462fc7d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 4 Sep 2021 19:03:32 -0400 Subject: [PATCH] clarify that character references are not interpreted in HTML blocks and raw HTML The wording in section 2.5 implied otherwise, although an example in 6.6 did clarify. Adjust the first to remove the false implication and adjust the second from saying "preserved", which might mean they have to be parsed first, to "copied uninterpreted". --- spec.txt | 62 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/spec.txt b/spec.txt index 3f6bf0f9..89316892 100644 --- a/spec.txt +++ b/spec.txt @@ -722,57 +722,64 @@ recognized as entity references either: ```````````````````````````````` -Entity and numeric character references are recognized in any -context besides code spans or code blocks, including -URLs, [link titles], and [fenced code block][] [info strings]: +Entity and numeric character references are treated as literal +text in code spans and code blocks: ```````````````````````````````` example - +`föö` . - +

föö

```````````````````````````````` ```````````````````````````````` example -[foo](/föö "föö") + föfö . -

foo

+
föfö
+
```````````````````````````````` + +Entity and numeric character references are left uninterpreted +in HTML blocks and raw HTML: + ```````````````````````````````` example -[foo] +
-[foo]: /föö "föö" +Link . -

foo

+
+

Link

```````````````````````````````` +Entity and numeric character references are recognized in any +any other context, including URLs, [link titles], and +[fenced code block][] [info strings]: + ```````````````````````````````` example -``` föö -foo -``` +[foo](/föö "föö") . -
foo
-
+

foo

```````````````````````````````` -Entity and numeric character references are treated as literal -text in code spans and code blocks: - ```````````````````````````````` example -`föö` +[foo] + +[foo]: /föö "föö" . -

föö

+

foo

```````````````````````````````` ```````````````````````````````` example - föfö +``` föö +foo +``` . -
föfö
+
foo
 
```````````````````````````````` @@ -9173,17 +9180,17 @@ foo &<]]> ```````````````````````````````` -Entity and numeric character references are preserved in HTML +Entity and numeric character references are copied uninterpreted in HTML attributes: ```````````````````````````````` example -foo +foo . -

foo

+

foo

```````````````````````````````` -Backslash escapes do not work in HTML attributes: +Backslash escapes are also copied uninterpreted: ```````````````````````````````` example foo @@ -9192,6 +9199,9 @@ foo ```````````````````````````````` +Not interpreting backslash escapes can mean not recognizing +a tag that HTML5 would recognize: + ```````````````````````````````` example .