Page MenuHomePhabricator

[HTMLets] Deprecated preg_replace(): The /e modifier is deprecated in HTMLets
Closed, ResolvedPublic


When using the HTMLets extension with PHP 5.5.13 you get the following warning: "Depricated preg_replace(): The /e modifier is deprecated, use preg_replace_callback() instead"

Not sure if the code is correct but replacing the function wfRenderHTMLetHackPostProcess in HTMLets.php starting on line 134 with the below code solves the problem. Not sure if the code is correct. Code taken from

function wfRenderHTMLetHackPostProcess( $parser, &$text ) {
$text = preg_replace_callback(

		'/<!-- @HTMLetsHACK@ ([0-9a-zA-Z\\+\\/]+=*) @HTMLetsHACK@ -->/sm',
		function ($m) {
			return base64_decode("$m[1]");


return true;

Version: REL1_22-branch
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 3:17 AM
bzimport set Reference to bz66706.
bzimport added a subscriber: Unknown Object (MLST).

Thanks for your report!
CC'ing the maintainer of

In case you feel like cooking up a patch,
you are welcome to use Developer access

to submit this as a Git branch directly into Gerrit:

Putting your branch in Git makes it easier to review it quickly. If you don't want to set up Git/Gerrit, you can also use

Created attachment 15681
HTMLets.php patch


Change 140311 had a related patch set uploaded by Gerrit Patch Uploader:
HTMLets.php patch

Change 140311 had a related patch set uploaded (by Qgil):
HTMLets.php patch

Change 140311 merged by jenkins-bot:
HTMLets.php patch

Paladox removed a project: Patch-For-Review.
Paladox set Security to None.
Paladox removed a subscriber: gerritbot.
Paladox added a subscriber: Paladox.

Patch was merged. please re open if the problem still happends.