| Parameterized Escaper | Parameters |
| regexps |
Regexp-replacing.
|
| Parameter name | Description |
| patterns |
A list of entries describing regular expresions replacements. Replacements happens per word.
|
|
| wrap |
Word wrapping. Works on plain/text, and wraps with newlines. Can be converted to HTML with a chained escaper.
|
| Parameter name | Description |
| length |
Length of lines (default to 80).
|
|
| substring |
Take substring.
|
| Parameter name | Description |
| from | |
| to | |
| ellipsis |
Can be used to put those three dots ('...') at the end of a 'substringed' line.
|
|
| paragraph | Wraps a text in paragraph (p) tags, unless it is empty or that textstarts with a p tag (in which case it is already wrapped). Use this for fields that contain HTML, but for which you are unsure if they have parahraph tags already |
| Parameter name | Description |
| class |
A class name to give to the paragraph tag.
|
|
| resourcebundle |
Replaces the words which are present as key in given resourcebundle with the values. Since
resource bundles are localized, this gives a way to translate (mm:write is nearly
fmt:message).
E.g. mm:write escape="resourcebundle(org.mmbase.datatypes.resources.ordinals)" value="5".
|
| Parameter name | Description |
| basename | |
| mode | |
| locale | |
|
| ordinals |
Replaces numerics with ordinals ('first', 'second'...).
|
| Parameter name | Description |
| basename | |
| mode | |
| locale | |
|
| google |
Explores the request for the 'referer' http header. If this is from google, the google search
words are highlighted in the text.
|
| Parameter name | Description |
|
| encryption |
Encrypts or decrypts the given input using a cryptographic algorithm that is specified as a parameter.
|
| Parameter name | Description |
| key |
The key used to encrypt the data. eg. AES uses a 128 bit key.
|
| format |
The in-/output format of the ecrypted data. 'hex'(default) or 'base64'
|
| algorithm |
The algorithm used for the encryption. eg. 'AES'(default), 'DES', 'Blowfish', etc.
|
| direction |
The direction of encryption. 'encrypt'(default) or 'decrypt'
|
|
| codesample |
Escapes the code between the tags you define.
This escaper enables the use of two different escapers in one piece of text.
It was started to simplify the inclusion of a code snippet in html but can be
used for other purposes as well.
You can specify the tags between which you wish to escape your text, the
escaper to use and you can set an escaper for the rest of the text. It needs
to be rewritten to support all escapers/transformers. It only supports the
escapers p, pp, p-ommit-surrounding, pp-ommit-surrounding, inline, text/html
and text/xml for now.
All parameters may be ommitted then it defaults to <pre> and 'text/html'.
Use it like f.e.:
<mm:import id="texttext">
This is an example:
<% String foo = "bar"; %>
</mm:import>
<mm:escaper type="codesample" id="testsample" />
<mm:write referid="testtext" escape="testsample" />
|
| Parameter name | Description |
| starttag |
The starttag, f.e. <pre>.
|
| closetag |
The closetag, f.e. </pre>.
|
| escapecode |
The escaper to use between the start- and closetag.
|
| escaperest |
The escaper to use on the rest of the text.
|
|
| tagstripper |
Changes existing HTML markup.
|
| Parameter name | Description |
| tags |
Either XSS or NONE. XSS will strip all tags and attributes which may have been present in the HTML to try cross-site-scripting.
NONE will strip all tags, and produce plain text.
|
| addbrs |
If true, then newlines are replaced by br-tags. This can be used to make better html from a kind of pseudo-html.
|
| escapeamps |
Html 4 entities are resolved. This indicated whether the remaining ampersands must be
replaced with &. Default to false. But see also the 'toxml' escaper.
|
|
| toxml |
This filters HTML-4, and cleanes it up, so that it is valid XML. At the moment, like tagstrippers(XSS), with escapeamps is true.
|
| Parameter name | Description |
| tags | |
| addbrs | |
| escapeamps | |
|