1

Topic: Ul/li tags stripped?

The following HTML

<p>Tools I used for this project:</p>
<p>
<ul>
<li><a href="http://www.jedit.org/">Jedit</a> (with OS X key bindings <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1966713&amp;group_id=588&amp;atid=300588">patch</a>)<br /></li>
<li><a href="http://www.syntevo.com/smartcvs/index.html">SmartCVS</a><br /></li>
<li><a href="http://www.mamp.info/en/download.html">MAMP</a><br /></li>
</ul>
</p>
<p>Check them out!</p>
<p> </p>

after being passed and returned from htmLawed with the following parameters:

// Either
$config = array(
'elements' => '*-script-iframe',
);

// Or
$config = array(
'safe' => 1,
'deny_attribute' => 'on*,style,',
);

Gets reduced to:

<p>Tools I used for this project:</p>
<p>

<a href="http://www.jedit.org/">Jedit</a> (with OS X key bindings <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1966713&amp;group_id=588&amp;atid=300588">patch</a>)<br />
<a href="http://www.syntevo.com/smartcvs/index.html">SmartCVS</a><br />
<a href="http://www.mamp.info/en/download.html">MAMP</a><br />

</p>
<p>Check them out!</p>
<p> </p>

Why are the ul/li tags disappearing?

2

Re: Ul/li tags stripped?

The 'p' element cannot have the 'ul' or 'ol' block-level element nested inside it; see the W3C specs (http://www.w3.org/TR/html401/struct/text.html#h-9.3.1). You can use a 'div' to enclose the 'ul' in your case.

3

Re: Ul/li tags stripped?

Ok, thanks!

The aformentioned HTML is being generated by TinyMCE. It gets cleaned up to W3C standards in Firefox, fails in Safari.

I have reported the bug to TinyMCE.