^encode( data )^

Tinderbox Icon

^encode( data )^

translates special character such as "<" and ">" contained in the data into entities before exporting them.

RSS and Atom syndication feeds with embedded mark-up tags — such as <b> or <p> — need to convert the tags into entities; <b> becomes &lt;b&gt; .

As of v2.4.0 ^encode recognises quotation marks. Single or double quotes that enclose the entire (data) string are stripped; otherwise, double quote marks are encoded.

Examples:

^encode(<b>)^ exports &lt;b&gt; .

^encode(^text^)^ exports the text of the node to HTML and then encodes that text

^encode(^get(Author)^)^ encodes whatever is stored in the user attribute "Author"

^encode(Ångstrom)^ now returns &Aring;ngstrom.


Up: Item-based
Previous: ^ancestors( start, list-item-prefix, list-item-suffix, end )^  Next: ^basicLinks( start, list-item-prefix, list-item-suffix, end )^ 

[Last updated: 3 Dec 2008]

Google search aTbRef for:  

Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]

Creative Commons License

Made with Tinderbox