A Tinderbox Reference File : Export Codes : Export Code Scope : Item-based : ^encode( data )^ |
^encode( data )^ |
^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 <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: Item-based | |
Previous: ^do( theMacro [,argument, anotherArgument, etc.] )^ | Next: ^endsWith( target, data )^ |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]