You could use a <pre> tag: http://www.w3schools.com/tags/tag_pre.asp. You
might need some CSS to get the font/styling you like.
You could also replace the newlines with <br> tags:
{{=XML(site.other.replace('\n', '<br>'), sanitize=True, permitted_tags=[
'br/'])}}
Because the text now contains <br> HTML tags, it is necessary to wrap it in
XML() to prevent web2py from escaping the HTML -- but you also want to
sanitize the text and allow *only* <br> tags to prevent malicious code from
being executed.
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.