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.

Example

Option Explicit

Dim strMessage
strMessage = "Sample text with (parenthesis) 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:

UnEscape - Return Unicode characters from an escaped ASCII string


© Copyright SS64.com 1999-2014
Some rights reserved