Re: Encoding with exceptions

2009-05-08 Thread Christian Edward Gruber
That's also possible. I could do that and then render... hmm... Christian. On 8-May-09, at 03:18 , Otho wrote: Is html input mandatory? Id not, how about using bbcode or some wiki markup language? 2009/5/7 Christian Edward Gruber Yeah - I don't, at least not yet. I probably will use su

Re: Encoding with exceptions

2009-05-08 Thread Otho
Is html input mandatory? Id not, how about using bbcode or some wiki markup language? 2009/5/7 Christian Edward Gruber > Yeah - I don't, at least not yet. I probably will use such an editor > later, but I need a protected output system so I'm not using > since that's quite dangerous when writi

Re: Encoding with exceptions

2009-05-07 Thread Christian Edward Gruber
Yeah - I don't, at least not yet. I probably will use such an editor later, but I need a protected output system so I'm not using since that's quite dangerous when writing from a database. I want ot make sure that even if bad data got in, it can't come out as an XSS attack or something.

Re: Encoding with exceptions

2009-05-07 Thread Howard Lewis Ship
Cool; I tend to do a lot of that from Ruby, using Hpricot. On Thu, May 7, 2009 at 2:28 PM, Martin Strand wrote: > If you need to parse html input, from a rich text editor, a remote website, > uploaded documents, etc, I would recommend nekohtml: > http://nekohtml.sourceforge.net/ > > It cleans up

Re: Encoding with exceptions

2009-05-07 Thread Martin Strand
If you need to parse html input, from a rich text editor, a remote website, uploaded documents, etc, I would recommend nekohtml: http://nekohtml.sourceforge.net/ It cleans up broken html and you can easily add a filter to only allow certain tags: http://nekohtml.sourceforge.net/filters.html Mar

Re: Encoding with exceptions

2009-05-07 Thread Howard Lewis Ship
I'd tend to do this on the other end, if possible; parse user input (or RSS feed, or whatever) into XML and transform out the content you don't like, then store that in DB or render it raw. On Thu, May 7, 2009 at 1:26 PM, Christian Edward Gruber wrote: > Hi, > >    I was considering how to write