This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

^opmlEncode( data )^ (DEPRECATED)

This pages describes features, codes or syntax whose use is now DEPRECATED, i.e. not advised either for new or continued pre-existing use.

Deprecated aspects of Tinderbox may be supported on a legacy basis but the latter support can't be presumed to be indefinite. Therefore you should update your active TBX documents to latest practice as soon as practical.


Code Type: 

Code Scope of Action: 

Code First Added: 

Code Altered: 

 Export Mark-up   [other codes of this type]

 item   [codes with similar scope]

 5.0.2

 format"


DEPRECATED - use ^value(attributeEncode())^. See ^value^, attributeEncode().

^opmlEncode( data )^

Revised in v5.5.0, the correct usage for this code is :

<code>^opmlEncode(^value($AttributeName)^)^</code> 

Apart from necessary use of format() for Color, Set and such data types, no other encoding of attribute data is now needed for OPML. Use of ^title^ and ^text^ in this context is deprecated (since v5.5.0).

Originally, opmlEncode() code would find and encode all paragraph breaks (hard line breaks) and encode them as <code>&#10;</code> entity. Addressing several edge cases, from v5.5.0, opmlEncode encodes all of the following to HTML entities:

The action code equivalent - of the original code is attributeEncode(). Note, the latter didn't reflect the v5.5.0 improvements to opmlEncode() until v5.8.0.

OPML

OPML is UTF-8 encoded XML. As Tinderbox v5+ now exports in UTF-8 encoding, the entities address several XML related factors. A requirement of XML is that literal left angle bracket, right angle bracket and ampersand literal characters - e.g. as in attribute values - must be in entity form. Although not specified, the same is needed for double quotes as these are the delimiter for XML attribute values and a literal " will otherwise cause early closure of an attribute value and confuse downstream parsing of data. Likewise a line feed character (used for paragraph breaks) is normal not expected in XML attributes but is handled safely if an entity. The entifying of single quotes is belt & braces to avoid issues of alternate use of quoting types.


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Deprecated Usage : Deprecated Export Codes : ^opmlEncode( data )^ (DEPRECATED)