|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
fthylmann Smarty n00b
Joined: 14 Nov 2004 Posts: 1 Location: Internet
|
Posted: Sun Nov 14, 2004 5:55 pm Post subject: Problem if magic_quotes_runtime is turned On |
|
|
Hi everyone.
I just found a problem when magic_quotes_runtime is turned On in PHP. This will cause, at least on some versions of PHP, the _read_file function to read the template with " and ' escaped. This in turn breaks the parsing of tags like
{assign var="foo" value="bar"}
Because the " are escaped to {assign var=\"foo\" value=\"bar\"}
I am not sure why this has been reported earlier, but it might be depending on the version of the regex system used if this actually breaks the parsing totally or not.
My fix on the system in question, which in my oppinion should not be a problem, is to simply add the following line after the fclose($fd) in _read_file():
if (get_magic_quotes_runtime()) $contents = stripslashes($contents); _________________ -- Fabian Thylmann
-- Too Much Media LLC
-- NATS - Next-generation Administration & Tracking System |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sun Nov 14, 2004 10:00 pm Post subject: |
|
|
I'm not sure where, but I think it is documented somewhere -- anyways, magic_quotes_runtime is not supported. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|