Escape

Encode a string of text, "escaping" all characters that are not allowable in web URL address strings.

Syntax 
      Escape(String)

Key
   String    The string of text to convert to an encoded string for use with HTML data transfer.

Note some web browsers will display URLs even without properly escaped characters. HTML with unescaped punctuation will fail validation.

Examples

Option Explicit

Dim strMessage
strMessage = "Sample text with (parentheses) spaces & " & Chr(34) & "quotes" & Chr(34)

MsgBox strMessage& vbCR & Escape(strMessage), vbOkOnly+vbInformation, "Demo"

“Writing is a form of therapy; sometimes I wonder how all those, who do not write, compose, or paint can manage to escape the madness, the melancholia, the panic fear, which is inherent in a human condition” ~ Graham Greene

Related VBScript commands

UnEscape - Return Unicode characters from an escaped ASCII string.


 
Copyright © 1999-2024 SS64.com
Some rights reserved