SPHttpUtility.EcmaScriptStringLiteralEncode Method (String)

Returns an encoded version of the specified JavaScript.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Shared Function EcmaScriptStringLiteralEncode ( _
    scriptLiteralToEncode As String _
) As String
'Usage
Dim scriptLiteralToEncode As String
Dim returnValue As String

returnValue = SPHttpUtility.EcmaScriptStringLiteralEncode(scriptLiteralToEncode)
public static string EcmaScriptStringLiteralEncode(
    string scriptLiteralToEncode
)

Parameters

  • scriptLiteralToEncode
    Type: System.String

    A string that contains the JavaScript to encode.

Return Value

Type: System.String
A string that contains the encoded version of the JavaScript.

Remarks

Ecma International develops standards for information and communication systems. For more information, see the official Web site for Ecma International at http://www.ecma-international.org/.

See Also

Reference

SPHttpUtility Class

SPHttpUtility Members

EcmaScriptStringLiteralEncode Overload

Microsoft.SharePoint.Utilities Namespace