Share via


SPEncode.WriteHtmlEncodePreserveSpaces method

Encodes the specified string so that characters in embedded HTML tags are displayed as text in the browser and writes the string to the HTTP output content stream, but preserves multiple spaces within the string.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Sub WriteHtmlEncodePreserveSpaces ( _
    response As HttpResponse, _
    str As String _
)
'Usage
Dim response As HttpResponse
Dim str As StringSPEncode.WriteHtmlEncodePreserveSpaces(response, _
    str)
public static void WriteHtmlEncodePreserveSpaces(
    HttpResponse response,
    string str
)

Parameters

Remarks

The WriteHtmlEncodePreserveSpaces method converts characters that can be confused with HTML tags to entities. For example, "<" is converted to "&lt;".

See also

Reference

SPEncode class

SPEncode members

Microsoft.SharePoint.Utilities namespace