I see in htmLawed 5.x-1.4 http://drupal.org/node/256013 this was fixed.
But in 7.x-3.0 I have no solution.

The problem is in htmlLawed to put whitespase before "-->"
<!--break--> - this work in drupal
<!--break --> - this not work

My config of htmLawed:
'cdata'=> 1, 'comment'=>3, 'css_expression'=>0, 'safe'=>1, 'elements'=>'a, img, u, b, em, strong, cite, blockquote, code, ul, ol, li, dl, dt, dd, h1, h2, h3, h4, h5, h6, p, div, span, br, hr, sup, sub, table, tr, td, th', 'deny_attribute'=>'id, on*'

Comments

alpha2zee’s picture

<!--break--> is an HTML comment which in the default htmLawed module setting is not permitted. To allow, add , 'comment'=>2 to the value for Config. in the module's settings. Check the htmLawed documentation to see how the htmLawed filter handles this setting. I hope this fixes the issue.

Note that besides the teaser break marker, this will also allow other HTML comments. However, I do not see any safety or rendering issue because of this.

seaji’s picture

In documentation:

If 0, such markup is not looked for and the text is processed like plain text. If 1, it is removed completely. If 2, it is preserved but any <, > and & inside are changed to entities. If 3, they are left as such.

My value 'comment'=>3 - comments are left as such.

In documentation (2.7 Tolerance for ill-written HTML):

* HTML comments should not be inside element tags (okay between tags), and should begin with

. Characters like <, >, and & may be allowed inside depending on $config, but any --> inside should be put in as -->. Any -- inside will be automatically converted to -, and a space will be added before the comment delimiter -->.

and a space will be added before the comment delimiter - this is my case.

Maybe this is not a bug because its in documentation but this "feature" crush drupal teaser break.

Maybe drupal core needs patch to accept <!--break -->

alpha2zee’s picture

Thanks for pointing out the 'space' issue. I will update the module to take care of it. Basically, the module will look for "<!--break -->" in the htmLawed-filtered text to remove the extra space.

alpha2zee’s picture

I have now released versions 3.1 of the module for Drupal 7, 3.2 and 2.12 for Drupal 6, and 2.10 for Drupal 5 to address this. The code-fix is to correct <!--break --> in the htmLawed-filtered text to remove the extra space. Enabling HTML comments through 'comment' => 2, etc. in Config. is required.

seaji’s picture

Great
thx )

alpha2zee’s picture

Assigned: Unassigned » alpha2zee
Category: feature » bug
Status: Active » Closed (fixed)
seaji’s picture

Status: Closed (fixed) » Active

Sad sad

Parse error: syntax error, unexpected T_STRING in /...../sites/all/modules/htmLawed/htmLawed.module on line 145

alpha2zee’s picture

Which version of the module are you using, 3.1 or 3.2?

seaji’s picture

Version: 7.x-3.0 » 7.x-3.2
Status: Active » Fixed

Fixed in htmlLawed 7.x-3.2

alpha2zee’s picture

Status: Fixed » Closed (fixed)