Markup filter wanted for a public website

Posted by sibidiba on Stack Overflow See other posts from Stack Overflow or by sibidiba
Published on 2010-05-09T20:16:26Z Indexed on 2010/05/09 20:18 UTC
Read the original article Hit count: 376

Filed under:
|
|
|

Developing a community site where everyone can post text, I'm looking for a markup filter:

  • What is not part of the markup must be escaped (htmlspecialchars()) as it is.
  • Should turn URL-s automatically into links
  • Should support some form of basic markups (bold, image, url, pre, list)
  • Should have a simple parser, that turns user input text into HTML

Content on the site is public to everyone, XSS must not allowed to happen.

What do you suggest? What markup language in the first place? BBCode? Wiki? Markdown? Are there any complete API-s with good examples?

PHP is available on the server side. If there is a WYSIWYG-like texarea in addition (like here on SO) that would be a fantastic bonus!

© Stack Overflow or respective owner

Related posts about php

Related posts about markup