This topic has not yet been rated - Rate this topic

SPEncode.ScriptEncode Method

Windows SharePoint Services 3
Encodes a string for use in script.

Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
public static string ScriptEncode (
	string str
)

Parameters

str

The string to encode.

Return Value

An encoded string for use in script.

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

Original

Replacement

"

\"

+

\u002b

\

\\

'

\u0027

>

\u003e

<

\u003c

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ