Re: Smarty parsing comment blocks?
| From: | Steve Manes | Date: | Tue, 26 Mar 2002 21:31:39 +0000 |
| Subject: | Re: Smarty parsing comment blocks? | ||
| References: | 1 | Groups: | php.smarty.general php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3376@lists.php.net to get a copy of this message | ||
At 02:33 PM 3/26/2002 -0600, Andrei Zmievski wrote:
On Tue, 26 Mar 2002, Steve Manes wrote: Mea culpa if this has already been discussed but I just subscribed. Does 2.0.1 fix this comment block problem? I ran into trouble with this: {* here's a comment *} Smarty 2.0 apparently uses an apostrophe as a delimiter in a regexp function. What problem are you referring to? What error do you get?Andrei, If I have a single quote (apostrophe) in a comment field like this: {* email_status 2: user attempted to create an email that's currently awaiting validation *} I get this: ----- Parse error: parse error in /mnt/raid/RAID00_5/web/Devel/smanes/Smarty/Smarty-2.0/Smarty_Compiler.class.php(95) : regexp code on line 2 Fatal error: Failed evaluating code: '{*'.str_repeat(" ", substr_count(' email_status 2: user attempted to create an email that''s currently awaiting validation ', " ")) .'*}' in /mnt/raid/RAID00_5/web/Devel/smanes/Smarty/Smarty-2.0/Smarty_Compiler.class.php on line 95 ---- It seems from the error message that the parser is using an apostrophe as a delimiter.