Supported formatting in posts (markdown, BBCode, and HTML)

There’s three things to consider.

  1. What Markdown is allowed?
  2. What BBCode is allowed?
  3. What HTML is allowed?

All 3 can be mixed and merged to some extent.


Simple: the Markdown implementation is very close to the standard.


We support a subset of “common” BBCode.

As for what BBCode is supported, the best place to look is the tests (app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js), and here’s what I see there:

[ul][li]option one[/li][/ul]



Custom BBCode specific to Discourse, needed for functions that don’t fit into Markdown, but do fit into BBCode.

[spoiler]it's a sled[/spoiler]
[quote="eviltrout, post:1, topic:2"]


Markdown specifies that it works seamlessly with HTML, so we do.

However, we only support a “safe” subset of HTML. I’ll have to dig to find the specifics, but anything common you’d expect to work that isn’t crazy – like <script> – should work.


None of these references mention tables.

That is true but this other topic does. Add a table to your post using markdown