LassoScript Utility
Basics Browse Detail

[Encode_Set] ... [/Encode_Set]

Tag Link [Encode_Set] ... Category Encoding
Type Container Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation Internal Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[Encode_Set] ... [/Encode_Set] sets the default encoding for all substitution tags which output values within the container tag.

Without using [Encode_Set] ... [/Encode_Set] tags all substitution tags have their values HTML encoded when output to the format file. Substitution tags used as sub-tags or in expressions have no encoding applied.

The [Encode_Set] ... [/Encode_Set] tags change the default encoding only for when substitution tags are output to the format file. Substitution tags within the container which are used as sub-tags or in expressions still have no encoding applied (e.g. -EncodeNone).

The [Encode_Set] ... [/Encode_Set] tags have no effect on member tags or the values of expressions which are output directly. The [Encode_Set] ... [/Encode_Set] tags have no effect on tags within included files.

Syntax

[Encode_SetEncoding Keyword]
  ...
[/Encode_Set]

Parameters

Required Parameters
Encoding Keyword Specifies the default encoding for all substitution tags within the container. One of -EncodeBreak, -EncodeHTML, -EncodeNone, -EncodeRaw, -EncodeSmart, -EncodeStrictURL, -EncodeURL, -EncodeXML.

Examples

To change the default encoding for a LassoScript:

Use [Encode_Set] ... [/Encode_Set] tags around the body of the LassoScript. The following example shows a LassoScript that outputs HTML text. Its encoding is changed to -EncodeNone so this keyword does not have to be specified in each [Output] tag.

<?LassoScript
  Encode_Set-EncodeNone;
    Output: '<br>These HTML values wil l be displayed as HTML';
    Output: '<br>rather than being displayed as HTML source.';
  /Encode_Set;
?>

<br>These html values will be displayed as HTML
<br>rather than being displayed as HTML source.