upgrade 7.0.8 to 7.0.9 HTML Purifier query

When I upgraded from 7.0.8 to 7.0.9 just a few days back, i found this error message in my error log.

PHP Warning:  Due to a documentation error in previous version of HTML Purifier, your definitions are not being cached.  If this is OK, you can remove the %HTML.DefinitionRev and %HTML.DefinitionID declaration.  Otherwise, modify your code to use maybeGetRawDefinition, and test if the returned value is null before making any edits (if it is null, that means that a cached version is available, and no raw operations are necessary).  See <a href='http://htmlpurifier.org/docs/enduser-customize.html#optimized'>Customize</a> for more details invoked on line 589 in file /xxx/inc/utils.inc.php in xxx/plugins/htmlpurifier/HTMLPurifier.standalone.php on line 2031.

I went to http://htmlpurifier.org/docs/enduser-customize.html#optimized and did the changes to utils.inc.php as mentioned. Didn't find anything to change in the HTMLPurifier.standalone.php.

 

Changes mentioned namely were:

Next, replace the raw definition retrieval with a maybeGetRawHTMLDefinition method call inside an if conditional, and place the editing code inside that if block.

$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.DefinitionID', 'enduser-customize.html tutorial');
$config->set('HTML.DefinitionRev', 1);
if ($def = $config->maybeGetRawHTMLDefinition()) { $def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top'); }
$purifier = new HTMLPurifier($config);

But i found later that users could register but the confirmation mails wouldn't work.

New error:

PHP Fatal error:  Uncaught exception 'HTMLPurifier_Exception' with message 'Cannot retrieve raw version without specifying %HTML.DefinitionID' in xxx/plugins/htmlpurifier/HTMLPurifier.standalone.php:1765
Stack trace:
#0 /xxx/plugins/htmlpurifier/HTMLPurifier.standalone.php(1848): HTMLPurifier_Config->getDefinition('HTML', true, true)
#1 /xxx/inc/utils.inc.php(598): HTMLPurifier_Config->maybeGetRawHTMLDefinition()
#2 /xxx/profile_activate.php(62): clear_xss('confirmation code was here..')
#3 /xxx/profile_activate.php(46): PageCompPageMainCode('57', 'confirmation code was here...')
#4 {main}  thrown in /xxx/plugins/htmlpurifier/HTMLPurifier.standalone.php on line 1765

 

Anyone tried that HTML Purifier upgrade too?

(anyway, i undid the changes and the confirmation mail is working.)

Quote · 18 Jun 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.