Patch xml_command to work with suhosin #1716
Reported by chugadie on 19 Aug 2008 23:50 UTC as Trac ticket #1485286
preg_replace with the /e modifier can be a security hole under some circumstances. The callback code is considered to be just like an "eval" when the suhosin patch is installed. So, protecting eval code and protecting roundcube's normal XML processing functions become intertwined.
This patch changes the parse_xml function of the template library to use preg_replace_callback instead of the /e modifier, thus creating a barrier between real roundcube code and eval()'d code.
Using preg_replace_callback is anectdotely faster than than preg_replace with the /e modifier as well
Keywords: suhosin preg_replace