Version 3 (modified by dwclifton, 6 years ago) (diff)


Inline XHTML Markup Macro


Returns raw, inline XHTML markup that has been validated and sanitized.


Markup that doesn't follow these requirements will be rejected with an error message:

  • Elements must be well-formed.
  • Tags and attribute names must be in lowercase, attribute values are required and must be enclosed in quotes.
  • Empty elements must be self-closing with a space before the forward slash, e.g. <img ... />.


Dangerous constructs such as <script> elements will be removed.

Use Cases

Inline is useful for creating "phrase" elements not supported by WikiFormatting, or for including attributes such as titles. The #!html WikiProcessor works well for creating larger chunks of markup, and in particular block-level elements such as an <address> that are also not supported (a Microformat is an excellent example). However, Inline is designed to be embedded directly in another construct, typically a paragraph of text.

Bugs/Feature Requests

Existing bugs and feature requests for InlineMacro are here.

If you have any issues, create a new ticket.


Download the zipped source from here.


You can check out InlineMacro from here using Subversion, or browse the source with Trac.

Example now a [[Inline(&lt;acronym title=&#34;Python Enhancement Proposal&#34;&gt;PEP&lt;/acronym&gt;)]].
Visit [[Inline(&lt;a href=&#34;...&#34; title=&#34;My Link&#34;&gt;my link&lt;/a&gt;)]].

Recent Changes

[13140] by rjollos on 2013-05-15 11:30:35
Added files previously attached to the project wiki page.
[5072] by dwclifton on 2008-12-30 16:14:06
New hack InlineMacro, created by dwclifton


  • Author: dwclifton
  • Contributors: The Python and Trac development community.