Skip to content

Markdown Processing

AutoBot Solutions edited this page Apr 29, 2026 · 1 revision

Markdown Processing

Overview

Posts support Markdown formatting with syntax highlighting, tables, and code blocks. Processed with python-markdown and sanitized with bleach.

Supported Markdown

  • Headers (H1-H6)
  • Bold, italic, code
  • Code blocks with syntax highlighting
  • Tables
  • Lists (ordered, unordered)
  • Blockquotes
  • Links
  • Horizontal rules

Implementation

markdown.markdown(text, extensions=['fenced_code', 'codehilite', 'tables', 'nl2br'])
bleach.clean(html, tags=allowed_tags)

Security

HTML sanitization prevents XSS attacks by removing dangerous tags and attributes.

Clone this wiki locally