HtmlEncodePreserveSpaces Method
The HtmlEncodePreserveSpaces method of the SPEncode class encodes the specified string so that special characters used in HTML are encoded as HTML entities but spaces are preserved.
Parameters
str The string to encode.
Return Value
The encoded version of the string that is passed to the method.
Remarks
Like the HtmlEncode method, the HtmlEncodePreserveSpaces method converts characters to entities as follows:
- < to <
- > to >
- & to &
- " to "
- ' to '
In addition, however, the HtmlEncodePreserveSpaces method also makes the following conversions to preserve spacing:
- single space to
- \n to <BR>
Requirements
Platforms: Microsoft Windows Server 2003
Security: Code Access Security