Escaping for PHP

James Ogley james at usr-local-bin.org
Fri Feb 29 23:18:07 EST 2008


I'm working on a nice user-friendly way of allowing people to block
feeds on Planet SUSE (see the work-in-progress version at
http://planetsuse.org/new.php).  The basic functionality is there but I
have a problem with including the <TMPL_VAR content> for each post
because of the presence of line breaks and quotation marks.

Is there an easy way to ESCAPE this for PHP - turning line breaks into
\n and " into \" in the same way as you can do ESCAPE="HTML" in the RSS
template?
-- 
James Ogley
james at usr-local-bin.org http://usr-local-bin.org
GNOME for openSUSE: http://software.opensuse.org/download/GNOME:/
Help end poverty: http://oxfam.org.uk/



More information about the devel mailing list