Forums / Cotonti / Support / Siena 0.9.4

"id=XXX" gets automaticly removed from "<div id="XXX"> tags when editing a page using HTML parsing

jamguy
#1 2011-09-19 20:40

Hi,

took me some time to understand what is wrong, but it seems to be that when editing a page using HTML parsing, all the DIV ID tags gets their ID removed.

For Example:

<div id="test"> becomes <div>

div class works though.

 

Thanks

 

GHengeveld
#2 2011-09-19 21:15

Yes, this is caused by HTML Purifier. If you don't allow regular users to post stuff on the site you can disable it (the plugin). Otherwise I recommend to find another solution because shutting it off brings big security risks. The simplest solution is to use the class attribute instead of id.

jamguy
#3 2011-09-19 21:29

Thank you,

Removing the Purifier plug-in solved my problem, its a non user post site, so I guess this is the best solution.

GHengeveld
#4 2011-09-19 23:35

Beware that it's also used for comments, so disabling HTML Purifier means you should disable comments too.

Macik
#5 2013-11-13 23:39

[For other users who search solution]

Use: 'Attr.EnableID' => true

in file `htmlpurifier.group_5.preset.php`

 

https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F