Closed (fixed)
Project:
HTML Purifier
Version:
6.x-2.0
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2009 at 23:28 UTC
Updated:
29 Sep 2009 at 09:00 UTC
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
Comment #1
xurizaemonOh - so the fix for me was to make the HTML valid :P
Comment #2
ezyang commentedComment #3
xurizaemonRestating 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.
Comment #4
ezyang commentedProbably not via the Drupal interface; HTML Purifier would have to be patched.
Comment #5
xurizaemonThanks.