Re: Extended escape modifier

From: Date: Fri, 29 Jun 2001 14:32:31 +0000
Subject: Re: Extended escape modifier
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1099@lists.php.net to get a copy of this message
On Fri, 29 Jun 2001, Monte Ohrt wrote: > Ok, for now we'll just add the quote escapement. Now for the logic > behind that: > > case 'quotes': > // escape unescaped single quotes > return preg_replace("%(?<!\\\\)'%", "\\'", $string); > > Does this look good? (only escape if not already escaped) Two things: 1. We are not going to escape double quotes? 2. What if you have a string "foo \\'this'" -- does this mean ' is already escaped? -Andrei * I don't have a solution but I admire the problem. *

« previous php.smarty.general (#1099) next »