Thread

Posted on Wed Feb 2 20:10:59 2005 by samtregar
Unable to post: text format is incorrect
I can't seem to post a message without receiveing the amazingly uninformative error "Text format is not correct." In fact, I had to edit this message several times before I found something bland enough to pass!
Direct Responses: 12 | Write a response
Posted on Wed Feb 2 20:15:29 2005 by szabgab in response to 10
Re: Unable to post: text format is incorrect
could you please send me an example of somethign that you could not post in e-mail to gabor@perl.org.il ? Basically the only character that should be rejected is < and >
Direct Responses: 14 | Write a response
Posted on Wed Feb 2 22:01:10 2005 by szabgab in response to 12
Re: Unable to post: text format is incorrect

Just for the record, after e-mail conversation with Sam it turnes out the site did not accept <p> on its own.

This is intentional. I wanted to make the site XHTML compilant and among other things it requires to close every paragraph with </p>

This of course make it less userfriendly so I might add some guessing mechanism and if people forget to close their paragraphs I will do that for them.

Any idea how to do that ?

Direct Responses: 17 | Write a response
Posted on Wed Feb 2 22:24:03 2005 by grantm in response to 14
Re: Unable to post: text format is incorrect

Randal Schwartz wrote an article on filtering HTML tags for forum comments etc in the May 2003 issue of The Perl Journal. He used XML::LibXML which can be used to read HTML instead and also has a recovery mode that allows it to recover from unbalanced tags etc.

Write a response