diff options
Diffstat (limited to 'devdocs/python~3.12/library%2Fhtml.entities.html')
| -rw-r--r-- | devdocs/python~3.12/library%2Fhtml.entities.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/devdocs/python~3.12/library%2Fhtml.entities.html b/devdocs/python~3.12/library%2Fhtml.entities.html new file mode 100644 index 00000000..23ba000b --- /dev/null +++ b/devdocs/python~3.12/library%2Fhtml.entities.html @@ -0,0 +1,20 @@ + <span id="html-entities-definitions-of-html-general-entities"></span><h1>html.entities — Definitions of HTML general entities</h1> <p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.12/Lib/html/entities.py">Lib/html/entities.py</a></p> <p>This module defines four dictionaries, <a class="reference internal" href="#html.entities.html5" title="html.entities.html5"><code>html5</code></a>, <a class="reference internal" href="#html.entities.name2codepoint" title="html.entities.name2codepoint"><code>name2codepoint</code></a>, <a class="reference internal" href="#html.entities.codepoint2name" title="html.entities.codepoint2name"><code>codepoint2name</code></a>, and <a class="reference internal" href="#html.entities.entitydefs" title="html.entities.entitydefs"><code>entitydefs</code></a>.</p> <dl class="py data"> <dt class="sig sig-object py" id="html.entities.html5"> +<code>html.entities.html5</code> </dt> <dd> +<p>A dictionary that maps HTML5 named character references <a class="footnote-reference brackets" href="#id2" id="id1">1</a> to the equivalent Unicode character(s), e.g. <code>html5['gt;'] == '>'</code>. Note that the trailing semicolon is included in the name (e.g. <code>'gt;'</code>), however some of the names are accepted by the standard even without the semicolon: in this case the name is present with and without the <code>';'</code>. See also <a class="reference internal" href="html#html.unescape" title="html.unescape"><code>html.unescape()</code></a>.</p> <div class="versionadded"> <p><span class="versionmodified added">New in version 3.3.</span></p> </div> </dd> +</dl> <dl class="py data"> <dt class="sig sig-object py" id="html.entities.entitydefs"> +<code>html.entities.entitydefs</code> </dt> <dd> +<p>A dictionary mapping XHTML 1.0 entity definitions to their replacement text in ISO Latin-1.</p> </dd> +</dl> <dl class="py data"> <dt class="sig sig-object py" id="html.entities.name2codepoint"> +<code>html.entities.name2codepoint</code> </dt> <dd> +<p>A dictionary that maps HTML4 entity names to the Unicode code points.</p> </dd> +</dl> <dl class="py data"> <dt class="sig sig-object py" id="html.entities.codepoint2name"> +<code>html.entities.codepoint2name</code> </dt> <dd> +<p>A dictionary that maps Unicode code points to HTML4 entity names.</p> </dd> +</dl> <h4 class="rubric">Footnotes</h4> <dl class="footnote brackets"> <dt class="label" id="id2"> +<code>1</code> </dt> <dd> +<p>See <a class="reference external" href="https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references">https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references</a></p> </dd> </dl> <div class="_attribution"> + <p class="_attribution-p"> + © 2001–2023 Python Software Foundation<br>Licensed under the PSF License.<br> + <a href="https://docs.python.org/3.12/library/html.entities.html" class="_attribution-link">https://docs.python.org/3.12/library/html.entities.html</a> + </p> +</div> |
