-
-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clarify that character references are not interpreted in HTML blocks and raw HTML #690
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -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 | ||||||||||||||
<a href="öö.html"> | ||||||||||||||
`föö` | ||||||||||||||
. | ||||||||||||||
<a href="öö.html"> | ||||||||||||||
<p><code>f&ouml;&ouml;</code></p> | ||||||||||||||
```````````````````````````````` | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
```````````````````````````````` example | ||||||||||||||
[foo](/föö "föö") | ||||||||||||||
föfö | ||||||||||||||
. | ||||||||||||||
<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p> | ||||||||||||||
<pre><code>f&ouml;f&ouml; | ||||||||||||||
</code></pre> | ||||||||||||||
```````````````````````````````` | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
|
||||||||||||||
Entity and numeric character references are left uninterpreted | ||||||||||||||
in HTML blocks and raw HTML: | ||||||||||||||
Comment on lines
+744
to
+745
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Personally I think this suggestion is clearer, but I don’t have strong opinions on it. |
||||||||||||||
|
||||||||||||||
```````````````````````````````` example | ||||||||||||||
[foo] | ||||||||||||||
<div id="©&asdf;"> | ||||||||||||||
|
||||||||||||||
[foo]: /föö "föö" | ||||||||||||||
Link <a href="©öö.html"> | ||||||||||||||
. | ||||||||||||||
<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p> | ||||||||||||||
<div id="©&asdf;"> | ||||||||||||||
<p>Link <a href="©öö.html"></p> | ||||||||||||||
```````````````````````````````` | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
Entity and numeric character references are recognized in any | ||||||||||||||
any other context, including URLs, [link titles], and | ||||||||||||||
[fenced code block][] [info strings]: | ||||||||||||||
Comment on lines
+757
to
+759
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Double |
||||||||||||||
|
||||||||||||||
```````````````````````````````` example | ||||||||||||||
``` föö | ||||||||||||||
foo | ||||||||||||||
``` | ||||||||||||||
[foo](/föö "föö") | ||||||||||||||
. | ||||||||||||||
<pre><code class="language-föö">foo | ||||||||||||||
</code></pre> | ||||||||||||||
<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p> | ||||||||||||||
```````````````````````````````` | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
Entity and numeric character references are treated as literal | ||||||||||||||
text in code spans and code blocks: | ||||||||||||||
|
||||||||||||||
```````````````````````````````` example | ||||||||||||||
`föö` | ||||||||||||||
[foo] | ||||||||||||||
|
||||||||||||||
[foo]: /föö "föö" | ||||||||||||||
. | ||||||||||||||
<p><code>f&ouml;&ouml;</code></p> | ||||||||||||||
<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p> | ||||||||||||||
```````````````````````````````` | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
```````````````````````````````` example | ||||||||||||||
föfö | ||||||||||||||
``` föö | ||||||||||||||
foo | ||||||||||||||
``` | ||||||||||||||
. | ||||||||||||||
<pre><code>f&ouml;f&ouml; | ||||||||||||||
<pre><code class="language-föö">foo | ||||||||||||||
</code></pre> | ||||||||||||||
```````````````````````````````` | ||||||||||||||
|
||||||||||||||
|
@@ -9173,17 +9180,17 @@ foo <![CDATA[>&<]]> | |||||||||||||
```````````````````````````````` | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
Entity and numeric character references are preserved in HTML | ||||||||||||||
Entity and numeric character references are copied uninterpreted in HTML | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Same as my earlier reasoning. |
||||||||||||||
attributes: | ||||||||||||||
|
||||||||||||||
```````````````````````````````` example | ||||||||||||||
foo <a href="ö"> | ||||||||||||||
foo <a href="ö©"> | ||||||||||||||
. | ||||||||||||||
<p>foo <a href="ö"></p> | ||||||||||||||
<p>foo <a href="ö©"></p> | ||||||||||||||
```````````````````````````````` | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
Backslash escapes do not work in HTML attributes: | ||||||||||||||
Backslash escapes are also copied uninterpreted: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
||||||||||||||
```````````````````````````````` example | ||||||||||||||
foo <a href="\*"> | ||||||||||||||
|
@@ -9192,6 +9199,9 @@ foo <a href="\*"> | |||||||||||||
```````````````````````````````` | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
Not interpreting backslash escapes can mean not recognizing | ||||||||||||||
a tag that HTML5 would recognize: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’m not a fan of this sentence: HTML(5) definitely does recognise this. It’s a “valid” but weird link to Perhaps better to say something along the lines of:
|
||||||||||||||
|
||||||||||||||
```````````````````````````````` example | ||||||||||||||
<a href="\""> | ||||||||||||||
. | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think “text” might be a bit confusing as there’s the connotation with “Textual content”. Characters in this context, is confusing too. So many like this?