This is a support request, but I've identified the fix for my case.

I copied some content from another CMS, and the links in an article disappeared. The format of the article was,

<blockquote>Blah blah</blockquote>
<li><a href="http://drupal.org/">blah</a></li>
<li><a href="http://google.com/">blah</a></li>
<blockquote>Blah.</blockquote>

HTMLPurifier removed the child elements of the <li> tags, which removed the links, leaving only their text. The <li>s were removed because they lacked a parent <ul> or <ol>.

This is not specific to the Drupal module - you can see the same by pasting the above HTML at http://htmlpurifier.org/demo.php - but I'd like to know if we can configure HTMLPurifier via the Drupal interface to correct the parent errors without punishing the children.

Think of the DOM children!

Comments

xurizaemon’s picture

Oh - so the fix for me was to make the HTML valid :P

ezyang’s picture

Status: Active » Closed (fixed)
xurizaemon’s picture

Status: Closed (fixed) » Active

Restating my question (sorry, the original description didn't make the question very clear):

I'd like to know if we can configure HTMLPurifier via the Drupal interface to correct the parent errors without punishing the children.

ezyang’s picture

Probably not via the Drupal interface; HTML Purifier would have to be patched.

xurizaemon’s picture

Status: Active » Fixed

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.