You get a bonus - 1 coin for daily activity. Now you have 1 coin

HTMLPurifier strips (removes) anchors from the resulting HTML document

Practice



If you use HTML Purifier to validate the resulting document, you should know that this module strips anchors by default. That is, you won't be able to follow a link like "#my_anchor", because the code '<a name="myname"></a>' will be reduced to '<a></a>'.

To enable anchor support - add the following line to the Purifier config:

$myPurifier->set('Attr.EnableID', true);


where instead of $myPurifier you use whatever variable name you use in your code.

Applies to: HTML Purifier

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)