Share via


SPEncode.WriteHtmlEncodePreserveSpacesWithQuote 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 and surrounds the string with quotation marks.

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

Syntax

'Declaration
Public Shared Sub WriteHtmlEncodePreserveSpacesWithQuote ( _
    response As HttpResponse, _
    str As String, _
    quoteChar As Char _
)
'Usage
Dim response As HttpResponse
Dim str As String
Dim quoteChar As CharSPEncode.WriteHtmlEncodePreserveSpacesWithQuote(response, _
    str, quoteChar)
public static void WriteHtmlEncodePreserveSpacesWithQuote(
    HttpResponse response,
    string str,
    char quoteChar
)

Parameters

  • quoteChar
    Type: System.Char

    A System.Char object that specifies the character to use for quotation marks.

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