Re: Extended escape modifier

From: Date: Thu, 28 Jun 2001 21:36:32 +0000
Subject: Re: Extended escape modifier
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1079@lists.php.net to get a copy of this message
sure, but what if you came across anything like &fooblah; now that wouldn't be legal xml, you would still have to escape it. Mike Krus wrote: > > Monte Ohrt wrote: > > > How does this xml escaping work? Does it just turn a "&" into a > > "&amp;" > > if it is followed by something like "foo;" ? > > > > If so, there is probably a much simpler way: > > > > preg_replace("!&([\w\d]+);!", "&amp;\\1;",$string); > well I guess that would catch most cases yeah. I was > > wanting to be more strict in preserve only entities > that are legal in the RSS DTD [1]. > > Mike > > [1] http://my.netscape.com/publish/formats/rss-0.91.dtd > > --- > You are currently subscribed to smarty as: monte@ispi.net > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

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