Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
filter.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
1 Mar 2012 at 14:39 UTC
Updated:
22 Jan 2023 at 12:07 UTC
Jump to comment: Most recent
Comments
Comment #1
shp commented+ Subscribing for this bug.
The reason is not the entire "Filtered HTML" format, but the "Limit allowed HTML tags" filter. It uses the
filter_xss(), which removes all the HTML comments.I've found the solution: adding
<!-->to the "Allowed HTML tags" list. But note, that this skips all the other HTML-comments!Comment #2
stolzenhain commentedI had a hard time finding any documentation on this while battling with the wysiwyg editor configuration – maybe a simple note on the text format page should be included.
For the exotic usecase of having more comments one wouldn't want to show up in the output, one could still build an extra filter removing any comment but the
<!--break-->one.Comment #4
rocketeerbkw commentedClosing as duplicate of #881006: Regression: 'break' tag doesn't work with Filtered HTML. There's a workaround in comment #118.