HttpEncoder.JavaScriptStringEncode(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encodes a string.
protected public:
virtual System::String ^ JavaScriptStringEncode(System::String ^ value);
protected internal virtual string JavaScriptStringEncode (string value);
abstract member JavaScriptStringEncode : string -> string
override this.JavaScriptStringEncode : string -> string
Protected Friend Overridable Function JavaScriptStringEncode (value As String) As String
Parameters
- value
- String
The string to encode.
Returns
An encoded string.
Remarks
URL encoding makes sure that all browsers correctly transmit text in URL strings. Characters such as a question mark (?), ampersand (&), slash (/), and spaces might be truncated or corrupted by some browsers. Therefore, these characters must be encoded.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.