Share via


ScriptEncode Method

The ScriptEncode method of the SPEncode class encodes a string for use in script.

Parameters

str   The string to encode.

Return Value

An encoded string for use in script.

Remarks

The ScriptEncode method escapes characters that would otherwise conflict with script. This method makes replacements shown in the following table.

Original Replacement
" \"
+ \u002b
\ \\
' \u0027
> \u003e
< \u003c

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security