Character Entity Macro
Description
The EntityMacro package returns HTML 4.01 numeric character entity references from their corresponding names.
The character entity data is straight out of the DTD for HTML 4.01 so if there are errors or ommissions you can blame it on the W3C, not me. ;-)
See: Character entity references in HTML 4 for more information.
Calling the macro like so: [[Entity(name)]] returns the value. If no name matches, it returns an empty string. Names are case-sensitive, in other words, aacute is not the same code point as Aacute. Keyword syntax is also supported: [[Entity(name=name)]].
The macro is useful in any wiki formatted page.
Installation
Download the zipped source. Unzip the archive 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] entity.* = enabled
You may have to restart you Web server.
Examples
[[Entity(raquo)]] [[Entity(name=raquo)]]
Both of these examples will return »
Source
- Browse the source at: GitHub
- Public clone URL:
git clone git://github.com/dwclifton/tracentitymacro.git
Recent Changes
[5059] by dwclifton on 12/25/08 19:22:19
New hack EntityMacro, created by dwclifton
Author/Contributors
Attachments
- entitymacro.zip (4.4 kB) -
Zipped source code
, added by dwclifton on 12/25/08 19:30:57.

