Re: have trouble with safe and linebreaks together

2010-02-22 Thread Tom Coote
It wouldn't really matter if you needed to use something like html2pdf in the future because you can always run a context through a template to get the modified string including all the html before then using html2pdf. Also keeping that kind of display logic in templates means its easily modified

Re: have trouble with safe and linebreaks together

2010-02-22 Thread Ali Rıza Keleş
On Sun, 2010-02-21 at 15:27 -0800, Benjamin wrote: > If you still want to give your users quite a bit of formatting power > (other than just 'title' and 'body' fields), consider letting them use > something like markdown, restructured test, or something similar. This > way your application is safe

Re: have trouble with safe and linebreaks together

2010-02-22 Thread Ali Rıza Keleş
On Sun, 2010-02-21 at 14:24 -0800, cootetom wrote: > You have a mix of techniques here. You are allowing markup to be saved > into the database and then when being displayed in a template you are > again adding mark up there to! Why don't you have a model which has a > "title" field and a "body"

Re: have trouble with safe and linebreaks together

2010-02-21 Thread Benjamin
If you still want to give your users quite a bit of formatting power (other than just 'title' and 'body' fields), consider letting them use something like markdown, restructured test, or something similar. This way your application is safe from running arbitrary HTML, but your users get to make

Re: have trouble with safe and linebreaks together

2010-02-21 Thread cootetom
You have a mix of techniques here. You are allowing markup to be saved into the database and then when being displayed in a template you are again adding mark up there to! Why don't you have a model which has a "title" field and a "body" field. That way the user doesn't have to get involved with

have trouble with safe and linebreaks together

2010-02-21 Thread Ali Rıza Keleş
Hi all, I have a problem about template language. In my model there is a text field for body text of entries. And I markup my text with some html. Like below: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "Ut enim