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!