quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory (Grisha) Trubetskoy" <gri...@apache.org>
Subject Re: PSP escaping bug, and proposed fix
Date Tue, 20 Jul 2004 16:25:30 GMT

On Tue, 20 Jul 2004, Brendan O'Connor wrote:

> req.write(r"""<script>  var s = "firstline \nsecond line"; </script>
> """,0)
> Absolutely nothing is interpreted as escapes by python, so the \n would
> live on into the output page.  The only special character that would need
> to be escaped by psp_parser.l is the triple quote """ .

That's pretty clever - somehow it never occured to me that a """ string 
can also have an 'r' prepended.

> Unfortunately, I'm not terribly familiar with flex, and I don't have the
> special version needed to build mod_python and so haven't tested this --
> but here's my attempt to solve the problem.
> comments?  Thanks to all the developers for mod_python!

Thanks for the patch, I'll try to make some time this week to test it.


View raw message