Re: [SMARTY-GENERAL] Escape modifier: patch

From: Date: Wed, 03 Apr 2002 14:40:20 +0000
Subject: Re: [SMARTY-GENERAL] Escape modifier: patch
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3459@lists.php.net to get a copy of this message
Tim Strehle wrote:
Hello, Monte Ohrt wrote:
Does anyone object to using htmlentities over htmlspecialchars? I can see some possible backward compatability issues since it wouldn't have the same behavior. Another option is to pass a new attribute that determines whether to use htmlentities or htmlspecialchars.
I'm not totally sure, but I think there's an issue when generating XML (instead of HTML) with Smarty. The "specialchars" are always understood by an XML parser, while "entities" may break the parser due to the entities not being automatically defined. Or maybe you can add an "xml" escape type with the old behaviour? Regards, Tim
I could add an "xml" type, although this will still change the default behavior of escape. Would htmlentities be a better default behavior in most cases? -- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

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