Forums | Mahara Community

Developers /
Can't use clean_html more than once in a template


anonymous profile picture
Account deleted
Posts: 117

13 January 2010, 19:09

When I use clean_html in a template, I receive the following error:

Cannot redeclare class HTMLPurifier_AttrTransform_AValidator

Any idea how to fix this so I can use clean_html more than once in a template? I'm using Mahara 1.1.x.

Thanks

anonymous profile picture
Account deleted
Posts: 117

13 January 2010, 19:34

Once again I've solved the issue myself within minutes of posting.

If anybody else ever has this same issue, all you need to do is add

if (!class_exists('HTMLPurifier_AttrTransform_AValidator')){

before

class HTMLPurifier_AttrTransform_AValidator extends HTMLPurifier_AttrTransform

in web.php and of course include the closing } tag after the class.

2 results