[Twisted-Python] Woven and non-breaking spaces

Donovan Preston dp at twistedmatrix.com
Mon May 19 16:22:46 MDT 2003


On Monday, May 19, 2003, at 02:27 PM, Eric Holm wrote:

> Is there any way to dynamically insert a non-breaking space
> on a Woven page?  It looks to me like microdom blindly
> replaces "&" with "&amp", and I couldn't find a way to
> escape the "&" in " ", but I could (easily) have
> missed it.  Here's an example of what I'm trying to do:
>
> from twisted.web.woven import page
>
> theModel = { "someData": "Before     After" }
> theHtml = '<html><span model="someData" 
> view="Text">placeholder</span></html>'

Try view="RawText" instead of "Text"...

>
> resource = page.Page( theModel, template=theHtml )
>
>
> I'm using 1.0.5, Python 2.2, on Win2K.
>
> Thanks,
>
>
> Eric.
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python





More information about the Twisted-Python mailing list