My htmLawed settings are:
'safe'=>1, 'elements'=>'a, em, strong, cite, code, ol, ul, li, dl, dt, dd, br, p, object, embed, img, table, th, td, tr, span, script', 'deny_attribute'=>'id, style, class', 'no_deprecated_attr'=>1, 'make_tag_strict'=>1, 'valid_xhtml'=>1, 'comment'=>1, 'cdata'=>1

Now when I put some text like this in Drupal:

<span style="color: #666666;">first: </span><b style="color:#666666;">second</b><br />

I get this:

#666666;">first: second

However, with htmLawed demo, here: http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htm..., when I paste the text in and deny attributes and allow the same set of elements (with the other settings as above), I get

first: second 

Am I doing something wrong?

Comments

alpha2zee’s picture

Thank you for pointing this, but can you tell me what output you expect/want? Is it the one you see on the htmLawed demo site?

PS: Probably not helpful here, but you may want to update the module's htmLawed.php file -- see this post.

deltab’s picture

hi @alpha2zee, finally tracked the issue down to Twitter input filter: http://drupal.org/project/twitter_input_filter

This issue comes about with Twitter #hastags Input Filter enabled, and no matter what order I trigger htmLawed, does not go away.

alpha2zee’s picture

Status: Active » Closed (fixed)

If htmLawed is the last filter and the Twitter Input filter creates valid HTML code, htmLawed should be able to let it pass unfiltered without any issue, though you may want to look at the htmLawed settings to ensure that HTML tags/attributes created by the Twitter filter are allowed in htmLawed.

If htmLawed runs before the Twitter filter, then may be there is an issue in the latter's logic.