In Drupal 6.x version HTML Purifier can work well with Drupal internal input syntax <!--break--> for separate position of the node preview part within trimmed version, manually.
BTW, when installing HTML Purifier 7.x-2.x-dev, the <!--break--> syntax is no longer functioning. It looks like the <!--break--> syntax is being filtered by HTML Purifier and so Drupal core not able to capture and handle it.
I try to disable/enable either "HTML Purifier" or "HTML Purifier (advanced)" within a single text input filter, and always works ONLY when without HTML Purifier.
Maybe we are missing something during version upgrade from Drupal 6.x-2.x, or there should be some new and additional exception case in Drupal 7.x core input filtering system?
Comment | File | Size | Author |
---|---|---|---|
#4 | break_filter-7.x-1.x-dev.tgz | 557 bytes | Anonymous (not verified) |
#1 | htmlpurifier-7.x-2.x-break_not_work-1087440-001.png | 331.16 KB | hswong3i |
#1 | htmlpurifier-7.x-2.x-break_not_work-1087440-002.png | 223.79 KB | hswong3i |
Comments
Comment #1
hswong3i CreditAttribution: hswong3i commentedPlease find the attached screenshot for more information.
Comment #2
kdhartstrom CreditAttribution: kdhartstrom commentedI am also running into this same issue. I did find some ideas here http://htmlpurifier.org/phorum/read.php?3,4599,4599#msg-4599 that might be worth a try.
Comment #3
jeffwidman CreditAttribution: jeffwidman commentedsubscribe
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI wrote a teeny tiny module that works around this by preprocessing the breaks into something HTML Purifier friendly and then processing them back into the standard break later. I've attached it (set it to run after HTML Purifier), but I think this is something that could easily be integrated into the HTML Purifier module itself in a similar manner.
Comment #5
scitoThis problem is due to #881006: Regression: 'break' tag doesn't work with Filtered HTML of Drupal core. In Drupal 6 the break tag was processed before filters and now afterwards. All filters are affected by this problem.
Comment #6
djmy CreditAttribution: djmy commentedsubscribe
Comment #7
ezyang CreditAttribution: ezyang commentedFixed in upstream HTML Purifier 4.4.0, but you need some configuration: Turn on %HTML.AllowedComments, and %HTML.AllowedCommentsRegexp to allow break.
Comment #9
drakythe CreditAttribution: drakythe commentedI'm sorry to re-open this, but I'm a little confused. Is it possible to fix this via HTML Purifier, or does the core issue mentioned in #5 mean this is not possible to really fix right now?
And if it is fixable via html purifier, How is that done? I don't understand #7's commens...
Comment #10
heddnIt is possible to fix via HTML Purifier on D7. You have to use an advanced filter and use %HTML.AllowedComments, and %HTML.AllowedCommentsRegexp to allow the 'break' comment pass through the filter.
Comment #11
drakythe CreditAttribution: drakythe commentedOkay, I get that, but what settings do I use in order to get it to be allowed? If I simply uncheck the allowedcommentregexp disabled box I get a preg_match() error
Comment #12
drakythe CreditAttribution: drakythe commentedAlright, I got this fixed. For anyone else who has this same issue, in the "AllowedCommentsRegexp" box, put this string
/^break$/
make sure to clear your HTML purifier cache, and you're done.
Note that this only works if the "Limit allowed HTML tags" Filter is off, as that breaks (heh, no pun intended)
<!--break-->
support, and is a core issue being discussed here #881006: Regression: 'break' tag doesn't work with Filtered HTMLComment #13
mustardman CreditAttribution: mustardman commentedplease delete this post. I found my problem