I have used the pyramid framework to build a large web application.
Among other things, this application allows the user to enter text into a text area form field. This text is then saved to a database and of course can be readout again and displayed later.
To display content I am using the Chameleon Template Engine.
This works fine, except that line breaking is not displayed correctly (not displayed at all). This is probably due to the fact that the newlines entered into the text area do not cause a new line in HTML when displayed through Chameleon. How can one fix this?
It does not help to replace the newlines by <br>
-Tags because by default Chameleon escapes all HTML-Tags. I am aware of the fact that one can deactivate this feature, but I do not want to do that to avoid cross-site scripting.