This version is out of date, covering development from v4.6.0 to v4.7.1. It is maintained here only for inbound reference links from elsewhere. Jump to the current version of aTbRef. |
|
A Tinderbox Reference File : Export Codes : Export Codes - Full Listing : ^encode( data )^ | aTbRef Site Map |
^encode( data )^ |
Code Type: | Export Mark-up |
Code Scope of Action: | item |
^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> .
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 <b> .
^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)^
returns Ångstrom.
Up: Export Codes - Full Listing | |
Previous: ^else^ | Next: ^endIf^ |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]