[Phplib-users] problem in template.inc
Brought to you by:
nhruby,
richardarcher
From: Hristo O. <od...@gm...> - 2004-11-18 08:47:02
|
Hi everybody! As the bug list seems not really in use :), I will bother you here with this issue. If you try to set a variable which has several backslashes, they will be interpreted as escaping! Ex.: template.inc->function subst()-> the line with preg_replace. If you enter a variable "big bla \\\\", you will get "big bla \". That is due to the greedy regular expression nature of the preg_replace implementation and could be very annoying to find. So my solution was to use str_replace for the backslash case but I think there are also other possible cases where this effect ruins the output. Regards, Christo |