wiki:InlineMacro

Display inline sanitized XHTML markup

Notice: This plugin is unmaintained and available for adoption.

Description

This plugin returns raw, inline XHTML markup that has been validated and sanitized.

Validation

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 ... />.

Sanitization

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.

Examples

...is now a [[Inline(<acronym title="Python Enhancement Proposal">PEP</acronym>)]].
Visit [[Inline(<a href="..." title="My Link">my link</a>)]].

Bugs/Feature Requests

Existing bugs and feature requests for InlineMacro are here.

If you have any issues, create a new ticket.

defect

0 / 1

Source

  • Browse the source at: GitHub.
  • Public clone URL:
    git clone git://github.com/dwclifton/tracinlinemacro.git
    

Installation

Download the attached zipfile, unpack to a temporary location, visit the 0.11 directory and run:

python setup.py bdist_egg
cp dist/*.egg /trac/env/Project/plugins

Configuration

Enable the macro in /trac/env/Project/conf/trac.ini:

[components]
inline.* = enabled

You may have to restart your Web server.

Recent Changes

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

Author/Contributors

Author: dwclifton
Maintainer: none (needsadoption)
Contributors: The Python and Trac development community.

Last modified 3 years ago Last modified on Mar 11, 2022, 6:46:53 PM