Skip to content

HTML tags for article

Here we analyze, which types of HTML tags are allowed inside the content field of Article type objects. One should expect that a Note, i.e.

Represents a short written work typically less than a single paragraph in length.

see here, should not contain headings h1-h6 or embedded media, e.g. img.

Sanitizing fields is desired behavior as seen in Section B.10 of ActivityPub.

Details

content content Example
<b>bold</b>
<b>bold</b>
<strong>strong</strong>
<strong>strong</strong>
<i>italic</i>
<i>italic</i>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<em>emphasis</em>
<em>emphasis</em>
<del>old</del><ins>new</ins>
<del>old</del>new
<s>stricken</s>
stricken
<mark>mark</mark>
mark
find <var>x</var> (a variable)
find x (a variable)
<ol><li>ordered</li></ol>
<ol><li>ordered</li></ol>
<ul><li>unordered</li></ul>
<ul><li>unordered</li></ul>
<h1>h1</h1>
h1
<h2>h2</h2>
h2
<h3>h3</h3>
h3
<h4>h4</h4>
h4
<h5>h5</h5>
h5
<h1>h1</h1><h2>h2</h2>
h1h2
<code>code</code>
<code>code</code>
<pre>pre</pre>
<pre>pre</pre>
<blockquote>blockquote</blockquote>
<blockquote>blockquote</blockquote>
line<br/>break
line<br/>break
<p>paragraph</p>
<p>paragraph</p>
<small>small</small>
<small>small</small>
<sup>sup</sup>
<sup>sup</sup>
<sub>sub</sub>
<sub>sub</sub>
<a href='https://funfedi.dev'>funfedi</a>
<a href="https://funfedi.dev">funfedi</a>
<script>alert('hi');</script>
alert(&#39;hi&#39;);
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo" />
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo"/>
wbr: Fernstraßen<wbr />bau<wbr />privat<wbr />finanzierungs<wbr />gesetz
wbr: Fernstraßenbauprivatfinanzierungsgesetz
Audio <audio controls src="http://pasture-one-actor/assets/cow_moo.mp3"></audio>
Audio 
content content Example
<b>bold</b>
<b>bold</b>
<strong>strong</strong>
<strong>strong</strong>
<i>italic</i>
<i>italic</i>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142" rel="nofollow noreferrer noopener" target="_blank">Issue 142</a>
<em>emphasis</em>
<em>emphasis</em>
<del>old</del><ins>new</ins>
<del>old</del><ins>new</ins>
<s>stricken</s>
<s>stricken</s>
<mark>mark</mark>
<mark>mark</mark>
find <var>x</var> (a variable)
find <var>x</var> (a variable)
<ol><li>ordered</li></ol>
<ol><li>ordered</li></ol>
<ul><li>unordered</li></ul>
<ul><li>unordered</li></ul>
<h1>h1</h1>
<h1>h1</h1>
<h2>h2</h2>
<h2>h2</h2>
<h3>h3</h3>
<h3>h3</h3>
<h4>h4</h4>
<h4>h4</h4>
<h5>h5</h5>
<h5>h5</h5>
<h1>h1</h1><h2>h2</h2>
<h1>h1</h1><h2>h2</h2>
<code>code</code>
<code>code</code>
<pre>pre</pre>
<pre>pre</pre>
<blockquote>blockquote</blockquote>
<blockquote>blockquote</blockquote>
line<br/>break
line<br>break
<p>paragraph</p>
<p>paragraph</p>
<small>small</small>
<small>small</small>
<sup>sup</sup>
<sup>sup</sup>
<sub>sub</sub>
<sub>sub</sub>
<a href='https://funfedi.dev'>funfedi</a>
<a href="https://funfedi.dev" rel="nofollow noreferrer noopener" target="_blank">funfedi</a>
<script>alert('hi');</script>
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo" />
wbr: Fernstraßen<wbr />bau<wbr />privat<wbr />finanzierungs<wbr />gesetz
wbr: Fernstraßen<wbr>bau<wbr>privat<wbr>finanzierungs<wbr>gesetz
Audio <audio controls src="http://pasture-one-actor/assets/cow_moo.mp3"></audio>
Audio
content content Example
<b>bold</b>
<b>bold</b>
<strong>strong</strong>
<strong>strong</strong>
<i>italic</i>
<i>italic</i>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<em>emphasis</em>
<em>emphasis</em>
<del>old</del><ins>new</ins>
<del>old</del><ins>new</ins>
<s>stricken</s>
<s>stricken</s>
<mark>mark</mark>
<mark>mark</mark>
find <var>x</var> (a variable)
find <var>x</var> (a variable)
<ol><li>ordered</li></ol>
<ol><li>ordered</li></ol>
<ul><li>unordered</li></ul>
<ul><li>unordered</li></ul>
<h1>h1</h1>
<h1>h1</h1>
<h2>h2</h2>
<h2>h2</h2>
<h3>h3</h3>
<h3>h3</h3>
<h4>h4</h4>
<h4>h4</h4>
<h5>h5</h5>
<h5>h5</h5>
<h1>h1</h1><h2>h2</h2>
<h1>h1</h1><h2>h2</h2>
<code>code</code>
<code>code</code>
<pre>pre</pre>
<pre>pre</pre>
<blockquote>blockquote</blockquote>
<blockquote>blockquote</blockquote>
line<br/>break
line<br/>break
<p>paragraph</p>
<p>paragraph</p>
<small>small</small>
<small>small</small>
<sup>sup</sup>
<sup>sup</sup>
<sub>sub</sub>
<sub>sub</sub>
<a href='https://funfedi.dev'>funfedi</a>
<a href='https://funfedi.dev'>funfedi</a>
<script>alert('hi');</script>
<script>alert('hi');</script>
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo" />
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo" />
wbr: Fernstraßen<wbr />bau<wbr />privat<wbr />finanzierungs<wbr />gesetz
wbr: Fernstraßen<wbr />bau<wbr />privat<wbr />finanzierungs<wbr />gesetz
Audio <audio controls src="http://pasture-one-actor/assets/cow_moo.mp3"></audio>
Audio <audio controls src="http://pasture-one-actor/assets/cow_moo.mp3"></audio>
content content Example
<b>bold</b>
<p>http://pasture-one-actor/actor/9nCDOeaEdac</p>
<strong>strong</strong>
<p>http://pasture-one-actor/actor/kDbAosezWMU</p>
<i>italic</i>
<p>http://pasture-one-actor/actor/uDXZ-qWpXAw</p>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<p>http://pasture-one-actor/actor/98012uGxGSc</p>
<em>emphasis</em>
<p>http://pasture-one-actor/actor/htKjhRv7Alk</p>
<del>old</del><ins>new</ins>
<p>http://pasture-one-actor/actor/0E3pYJLCRkM</p>
<s>stricken</s>
<p>http://pasture-one-actor/actor/v5QZlja6yqw</p>
<mark>mark</mark>
<p>http://pasture-one-actor/actor/cOrmcrNS4zE</p>
find <var>x</var> (a variable)
<p>http://pasture-one-actor/actor/J689gSa1tvc</p>
<ol><li>ordered</li></ol>
<p>http://pasture-one-actor/actor/mVx3ngM0-WA</p>
<ul><li>unordered</li></ul>
<p>http://pasture-one-actor/actor/6g_w4RSbfeM</p>
<h1>h1</h1>
<p>http://pasture-one-actor/actor/ipkHxtCPmeg</p>
<h2>h2</h2>
<p>http://pasture-one-actor/actor/QxOnr6_J9mk</p>
<h3>h3</h3>
<p>http://pasture-one-actor/actor/zxjFD8U4Eew</p>
<h4>h4</h4>
<p>http://pasture-one-actor/actor/AAW3BmWMicM</p>
<h5>h5</h5>
<p>http://pasture-one-actor/actor/e-Wq5Vf_6Pc</p>
<h1>h1</h1><h2>h2</h2>
<p>http://pasture-one-actor/actor/HrUy8C39VKo</p>
<code>code</code>
<p>http://pasture-one-actor/actor/REqPbJIOL0c</p>
<pre>pre</pre>
<p>http://pasture-one-actor/actor/g2LiRSGw0Lk</p>
<blockquote>blockquote</blockquote>
<p>http://pasture-one-actor/actor/vmovbUfEdCc</p>
line<br/>break
<p>http://pasture-one-actor/actor/1CmCmMT2WQo</p>
<p>paragraph</p>
<p>http://pasture-one-actor/actor/g6nMFVxo2qY</p>
<small>small</small>
<p>http://pasture-one-actor/actor/5PWSFMYTJkg</p>
<sup>sup</sup>
<p>http://pasture-one-actor/actor/c8lUhS3ANJ8</p>
<sub>sub</sub>
<p>http://pasture-one-actor/actor/ikiIUNpJx4U</p>
<a href='https://funfedi.dev'>funfedi</a>
<p>http://pasture-one-actor/actor/oj7m75Ox7oE</p>
<script>alert('hi');</script>
<p>http://pasture-one-actor/actor/pfGHl2DO4Fw</p>
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo" />
<p>http://pasture-one-actor/actor/sNAk0mR3WS0</p>
wbr: Fernstraßen<wbr />bau<wbr />privat<wbr />finanzierungs<wbr />gesetz
<p>http://pasture-one-actor/actor/x1TlplMapS0</p>
Audio <audio controls src="http://pasture-one-actor/assets/cow_moo.mp3"></audio>
<p>http://pasture-one-actor/actor/6lPp-KnKS-M</p>
content text Example
<b>bold</b>
**bold**
<strong>strong</strong>
**strong**
<i>italic</i>
<i>italic</i>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<i>italic with.</i> See [Issue 142](https://codeberg.org/helge/funfedidev/issues/142)
<em>emphasis</em>
<i>emphasis</i>
<del>old</del><ins>new</ins>
~~old~~new
<s>stricken</s>
~~stricken~~
<mark>mark</mark>
mark
find <var>x</var> (a variable)
find x (a variable)
<ol><li>ordered</li></ol>
ordered
<ul><li>unordered</li></ul>
unordered
<h1>h1</h1>
【h1】
<h2>h2</h2>
h2
<h3>h3</h3>
h3
<h4>h4</h4>
h4
<h5>h5</h5>
h5
<h1>h1</h1><h2>h2</h2>
【h1】
h2
<code>code</code>
`code`
<pre>pre</pre>
pre
<blockquote>blockquote</blockquote>
> blockquote
line<br/>break
line
break
<p>paragraph</p>
paragraph
<small>small</small>
<small>small</small>
<sup>sup</sup>
sup
<sub>sub</sub>
sub
<a href='https://funfedi.dev'>funfedi</a>
[funfedi](https://funfedi.dev)
<script>alert('hi');</script>
alert('hi');
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo" />
-
wbr: Fernstraßen<wbr />bau<wbr />privat<wbr />finanzierungs<wbr />gesetz
wbr: Fernstraßenbauprivatfinanzierungsgesetz
Audio <audio controls src="http://pasture-one-actor/assets/cow_moo.mp3"></audio>
Audio
content content Example
<b>bold</b>
<b>bold</b><p><a href="http://pasture-one-actor/actor/ntyk4c-EOv0" rel="noopener">http://pasture-one-actor/actor/ntyk4c-EOv0</a></p>
<strong>strong</strong>
<strong>strong</strong><p><a href="http://pasture-one-actor/actor/FKDRDrFZq84" rel="noopener">http://pasture-one-actor/actor/FKDRDrFZq84</a></p>
<i>italic</i>
<i>italic</i><p><a href="http://pasture-one-actor/actor/pSnDu7GtYIU" rel="noopener">http://pasture-one-actor/actor/pSnDu7GtYIU</a></p>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142" rel="noopener">Issue 142</a><p><a href="http://pasture-one-actor/actor/S8zn7zR1-dQ" rel="noopener">http://pasture-one-actor/actor/S8zn7zR1-dQ</a></p>
<em>emphasis</em>
<em>emphasis</em><p><a href="http://pasture-one-actor/actor/22aWBKptr-Y" rel="noopener">http://pasture-one-actor/actor/22aWBKptr-Y</a></p>
<del>old</del><ins>new</ins>
<del>old</del><ins>new</ins><p><a href="http://pasture-one-actor/actor/eNvJpZ02m-A" rel="noopener">http://pasture-one-actor/actor/eNvJpZ02m-A</a></p>
<s>stricken</s>
<s>stricken</s><p><a href="http://pasture-one-actor/actor/FcSFSPnaGrc" rel="noopener">http://pasture-one-actor/actor/FcSFSPnaGrc</a></p>
<mark>mark</mark>
<mark>mark</mark><p><a href="http://pasture-one-actor/actor/7K6DCXesMlM" rel="noopener">http://pasture-one-actor/actor/7K6DCXesMlM</a></p>
find <var>x</var> (a variable)
find <var>x</var> (a variable)<p><a href="http://pasture-one-actor/actor/iqp4OHagP3w" rel="noopener">http://pasture-one-actor/actor/iqp4OHagP3w</a></p>
<ol><li>ordered</li></ol>
<ol><li>ordered</li></ol><p><a href="http://pasture-one-actor/actor/d7mhkPRwDrs" rel="noopener">http://pasture-one-actor/actor/d7mhkPRwDrs</a></p>
<ul><li>unordered</li></ul>
<ul><li>unordered</li></ul><p><a href="http://pasture-one-actor/actor/6m-LbCluJz4" rel="noopener">http://pasture-one-actor/actor/6m-LbCluJz4</a></p>
<h1>h1</h1>
<h1>h1</h1><p><a href="http://pasture-one-actor/actor/8yip1Uumz3c" rel="noopener">http://pasture-one-actor/actor/8yip1Uumz3c</a></p>
<h2>h2</h2>
<h2>h2</h2><p><a href="http://pasture-one-actor/actor/ebt6dcJ63Tc" rel="noopener">http://pasture-one-actor/actor/ebt6dcJ63Tc</a></p>
<h3>h3</h3>
<h3>h3</h3><p><a href="http://pasture-one-actor/actor/S2nnA3HCxvU" rel="noopener">http://pasture-one-actor/actor/S2nnA3HCxvU</a></p>
<h4>h4</h4>
<h4>h4</h4><p><a href="http://pasture-one-actor/actor/pOFyP7AJMgI" rel="noopener">http://pasture-one-actor/actor/pOFyP7AJMgI</a></p>
<h5>h5</h5>
<h5>h5</h5><p><a href="http://pasture-one-actor/actor/1ilJ_W_gsSY" rel="noopener">http://pasture-one-actor/actor/1ilJ_W_gsSY</a></p>
<h1>h1</h1><h2>h2</h2>
<h1>h1</h1><h2>h2</h2><p><a href="http://pasture-one-actor/actor/RE6nwbQKeaQ" rel="noopener">http://pasture-one-actor/actor/RE6nwbQKeaQ</a></p>
<code>code</code>
<code>code</code><p><a href="http://pasture-one-actor/actor/Uw9T4yPOM-s" rel="noopener">http://pasture-one-actor/actor/Uw9T4yPOM-s</a></p>
<pre>pre</pre>
<pre>pre</pre><p><a href="http://pasture-one-actor/actor/YdluWuA_Xes" rel="noopener">http://pasture-one-actor/actor/YdluWuA_Xes</a></p>
<blockquote>blockquote</blockquote>
<blockquote>blockquote</blockquote><p><a href="http://pasture-one-actor/actor/e4rsTL86z3s" rel="noopener">http://pasture-one-actor/actor/e4rsTL86z3s</a></p>
line<br/>break
line<br>break<p><a href="http://pasture-one-actor/actor/3EWI4H4lgmc" rel="noopener">http://pasture-one-actor/actor/3EWI4H4lgmc</a></p>
<p>paragraph</p>
<p>paragraph</p><p><a href="http://pasture-one-actor/actor/eJmPNjWmcMM" rel="noopener">http://pasture-one-actor/actor/eJmPNjWmcMM</a></p>
<small>small</small>
<small>small</small><p><a href="http://pasture-one-actor/actor/5jmtcBpyZNI" rel="noopener">http://pasture-one-actor/actor/5jmtcBpyZNI</a></p>
<sup>sup</sup>
<sup>sup</sup><p><a href="http://pasture-one-actor/actor/r4O6emthHxM" rel="noopener">http://pasture-one-actor/actor/r4O6emthHxM</a></p>
<sub>sub</sub>
<sub>sub</sub><p><a href="http://pasture-one-actor/actor/vZeuZdGIBjw" rel="noopener">http://pasture-one-actor/actor/vZeuZdGIBjw</a></p>
<a href='https://funfedi.dev'>funfedi</a>
<a href="https://funfedi.dev" rel="noopener">funfedi</a><p><a href="http://pasture-one-actor/actor/gREDw-qSV4s" rel="noopener">http://pasture-one-actor/actor/gREDw-qSV4s</a></p>
<script>alert('hi');</script>
<p><a href="http://pasture-one-actor/actor/YWTvY_0GVj4" rel="noopener">http://pasture-one-actor/actor/YWTvY_0GVj4</a></p>
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo" />
http://pasture-one-actor/assets/nlnet.png<p><a href="http://pasture-one-actor/actor/IgMujAAeQrc" rel="noopener">http://pasture-one-actor/actor/IgMujAAeQrc</a></p>
wbr: Fernstraßen<wbr />bau<wbr />privat<wbr />finanzierungs<wbr />gesetz
wbr: Fernstraßen<wbr>bau<wbr>privat<wbr>finanzierungs<wbr>gesetz<p><a href="http://pasture-one-actor/actor/mpChZNOG-nY" rel="noopener">http://pasture-one-actor/actor/mpChZNOG-nY</a></p>
Audio <audio controls src="http://pasture-one-actor/assets/cow_moo.mp3"></audio>
Audio <p><a href="http://pasture-one-actor/actor/uTUlDMi6DL4" rel="noopener">http://pasture-one-actor/actor/uTUlDMi6DL4</a></p>
content content Example
<b>bold</b>
<b>bold</b>
<strong>strong</strong>
<strong>strong</strong>
<i>italic</i>
<i>italic</i>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<em>emphasis</em>
<em>emphasis</em>
<del>old</del><ins>new</ins>
<del>old</del><ins>new</ins>
<s>stricken</s>
<s>stricken</s>
<mark>mark</mark>
mark
find <var>x</var> (a variable)
find <var>x</var> (a variable)
<ol><li>ordered</li></ol>
<ol><li>ordered</li></ol>
<ul><li>unordered</li></ul>
<ul><li>unordered</li></ul>
<h1>h1</h1>
h1
<h2>h2</h2>
h2
<h3>h3</h3>
h3
<h4>h4</h4>
h4
<h5>h5</h5>
h5
<h1>h1</h1><h2>h2</h2>
h1h2
<code>code</code>
<code>code</code>
<pre>pre</pre>
<pre>pre</pre>
<blockquote>blockquote</blockquote>
<blockquote>blockquote</blockquote>
line<br/>break
line<br/>break
<p>paragraph</p>
<p>paragraph</p>
<small>small</small>
<small>small</small>
<sup>sup</sup>
<sup>sup</sup>
<sub>sub</sub>
<sub>sub</sub>
<a href='https://funfedi.dev'>funfedi</a>
<a href="https://funfedi.dev">funfedi</a>
<script>alert('hi');</script>
alert(&#39;hi&#39;);
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo" />
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo"/>
wbr: Fernstraßen<wbr />bau<wbr />privat<wbr />finanzierungs<wbr />gesetz
wbr: Fernstraßen<wbr/>bau<wbr/>privat<wbr/>finanzierungs<wbr/>gesetz
Audio <audio controls src="http://pasture-one-actor/assets/cow_moo.mp3"></audio>
Audio 
content content Example
<b>bold</b>
<p><span>bold</span></p>
<strong>strong</strong>
<p><span>strong</span></p>
<i>italic</i>
<p><span>italic</span></p>
<i>italic with.</i> See <a href="https://codeberg.org/helge/funfedidev/issues/142">Issue 142</a>
<p><span>italic with.</span><span> See </span><a rel="nofollow noopener noreferrer" target="_blank" href="https://codeberg.org/helge/funfedidev/issues/142"><span>Issue 142</span></a></p>
<em>emphasis</em>
<p><span>emphasis</span></p>
<del>old</del><ins>new</ins>
<p><span>~~old~~</span><span>new</span></p>
<s>stricken</s>
<p><span>~~stricken~~</span></p>
<mark>mark</mark>
<p><span>mark</span></p>
find <var>x</var> (a variable)
<p><span>find x (a variable)</span></p>
<ol><li>ordered</li></ol>
<p><span>ordered</span></p>
<ul><li>unordered</li></ul>
<p><span>unordered</span></p>
<h1>h1</h1>
<p><span>【h1】</span></p>
<h2>h2</h2>
<p><span>h2</span></p>
<h3>h3</h3>
<p><span>h3</span></p>
<h4>h4</h4>
<p><span>h4</span></p>
<h5>h5</h5>
<p><span>h5</span></p>
<h1>h1</h1><h2>h2</h2>
<p><span>【h1】</span><span><br></span><span>h2</span></p>
<code>code</code>
<p><code>code</code></p>
<pre>pre</pre>
<p><span>pre</span></p>
<blockquote>blockquote</blockquote>
<p><blockquote><span>blockquote</span></blockquote></p>
line<br/>break
<p><span>line<br>break</span></p>
<p>paragraph</p>
<p><span>paragraph</span></p>
<small>small</small>
<p><small><span>small</span></small></p>
<sup>sup</sup>
<p><span>sup</span></p>
<sub>sub</sub>
<p><span>sub</span></p>
<a href='https://funfedi.dev'>funfedi</a>
<p><a rel="nofollow noopener noreferrer" target="_blank" href="https://funfedi.dev"><span>funfedi</span></a></p>
<script>alert('hi');</script>
<p><span>alert('hi');</span></p>
<img src="http://pasture-one-actor/assets/nlnet.png" alt="NLNET Logo" />
wbr: Fernstraßen<wbr />bau<wbr />privat<wbr />finanzierungs<wbr />gesetz
<p><span>wbr: Fernstraßenbauprivatfinanzierungsgesetz</span></p>
Audio <audio controls src="http://pasture-one-actor/assets/cow_moo.mp3"></audio>
<p><span>Audio</span></p>