You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+17-20
Original file line number
Diff line number
Diff line change
@@ -8820,27 +8820,24 @@ <h3>Graph Containers</h3>
8820
8820
<adata-cite="HTML52/infrastructure.html#dynamic-changes-to-base-urls">Dynamic changes to base URLs</a>.</p>
8821
8821
</section>
8822
8822
8823
-
<section><h3>Restrictions for contents of JSON-LD <code>script</code> elements</h3>
8824
-
<pclass="issue atrisk">This section adds additional requirements for escaping
8825
-
certain JSON values when embedding that JSON within HTML. This approach
8826
-
is consequently subject to further discussion in the Working Group.</p>
8827
-
8828
-
<p>Depending on how the HTML document is served, certain strings may need
8829
-
to be escaped to prevent disrupting the HTML parsing algorithm.</p>
8830
-
8823
+
<sectionclass="informative"><h3>Restrictions for contents of JSON-LD <code>script</code> elements</h3>
8831
8824
<p>Due to the HTML <adata-cite="HTML52/semantics-scripting.html#restrictions-for-contents-of-script-elements">Restrictions for contents of <code><script></code> elements</a>
8832
8825
additional encoding restrictions are placed on JSON-LD data contained in
<p>A JSON-LD script element MUST contain only valid JSON.
8835
-
Any strings within the JSON content which contains text which can be confused with a <em>comment-open</em>, <em>script-open</em>,
8836
-
<em>comment-close</em>, or <em>script-close</em> MUST be escaped using <adata-cite="HTML5/syntax.html#character-references">HTML Character references</a>, such as the following:</p>
8837
-
<ul>
8838
-
<li><code>&amp;</code> → & (<ahref="/wiki/Ampersand" title="Ampersand">ampersand</a>, U+0026)</li>
0 commit comments