LassoScript Utility
Basics Browse Detail

[Encode_Smart]

Tag Link [Encode_Smart] Category Encoding
Type Substitution Source Available No
Support Preferred Version 2.5
Change Unchanged Data Source Any
Output Type String Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x, Lasso 2.5

Description

[Encode_Smart] takes a single argument which is a string to be encoded. It encodes any HTML illegal characters in the string into HTML entities. It leaves reserved characters such as <, >, ", or & untouched.

This tag can be used on text which contains HTML markup. It ensures that high-ASCII characters are encoded as HTML entities so they will display in Web browsers on any platform while allowing HTML markup to pass through unaltered.

Note: This tag performs the same encoding as the -EncodeSmart keyword.

Syntax

[Encode_Smart: 'Encoding Value']

Parameters

Required Parameters
Encoding Value The specified value will have -EncodeSmart encoding applied.

Examples

To encode text using smart HTML encoding:

Use the [Encode_Smart] tag. The following example encodes a string using smart HTML encoding to demonstrate what characters are replaced by HTML entitites. The characters required for HTML markup are not encoded, but the high-ASCII character is.

[Encode_Smart: '<b>mañana</b>']

<b>mañana</b>