Hi there,

at the moment i am using html purifier and i am thinking about to switch to htmlawed.

My short question: Is it possible and easy without any big hacking to add the rel attribute with nofollow to any links?

Thank you!

Comments

alpha2zee’s picture

It's easy. Just set the ''anti_link_spam' directive: go to the configuration page for the Drupal htmLawed module to edit the right Config. form-field to make it something like

example
'safe'=>1, 'elements'=>'a, em, strong, cite, code, ol, ul, li, dl, dt, dd', 'deny_attribute'=>'id, style', 'valid_xhtml'=>1, 'anti_link_spam'=>array('`.`', '')

With this, a rel="nofollow" will be aded to all 'a' elements. For other possibilities, please refer to the htmLawed documentation on anti_link_spam.

Witch’s picture

Hi alpha2zee!

Thank you, i will try it and give you some feedback.

Have a nice day.

alpha2zee’s picture

Status: Active » Closed (fixed)