Proceed to WirelessDevNet Home Page
Publications, e-books, and more! Community Tutorials Store Downloads, tools, & Freebies! IT Career Center News Home
newnav.gif

Newsletters
EMail Address:



   Content
  - Articles
  - Columns
  - Training
  - Library
  - Glossary
 
   Career Center
  - Career Center Home
  - View Jobs
  - Post A Job
  - Resumes/CVs
  - Resource Center
 
   Marketplace
  - Marketplace Home
  - Software Products
  - Wireless Market Data
  - Technical Books
 
   News
  - Daily News
  - Submit News
  - Events Calendar
  - Unsubscribe
  - Delivery Options
 
   Community
  - Discussion Boards
  - Mailing List
  - Mailing List Archives
 
   About Us
  - About WirelessDevNet
  - Wireless Source Disks
  - Partners
  - About MindSites Group
  - Advertising Information
 
WMLScript Reference WMLScript Reference

WMLScript > URL > escapeString()

escapeString() - The escapeString Function

Usage:  
escapeString(string)
Description:  This function computes a new version of a string value in which special characters specified by [RFC2396] have been replaced by a hexadecimal escape sequence (a two-digit escape sequence of the form %xx must be used). The characters to be escaped are:

  • Control Characters: <US-ASCII coded characters 00-1F and 7F>
  • Space: <US-ASCII coded character 20 hexadecimal>
  • Reserved: ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","
  • Unwise: "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`"
  • Delims: "<" | ">" | "#" | "%" | <">
  • Non-US-ASCII: <characters with hex code 8F-FF>


The given string is escaped as such; no URL parsing is performed. Non-US-ASCII characters must be converted using


Example:
var a = URL.escapeString("http://w.h.com/dck?x=u007f#crd");
// a = "http%3a%2f%2fw.h.com%2fdck%3fx%3d%7f%23crd"
var b = URL.escapeString("http://w.h.com/dck?x=\u007f#crd");
// b = "http:%3a%2f%2fw.h.com%2fdck%3fx%3d%5cd007f%23crd"




Bookmark this page
Sponsors

Search

Eliminate irrelevant hits with our industry-specific search engine!









Wireless Developer Network - A MindSites Group Trade Community
Copyright© 2000-2010 MindSites Group / Privacy Policy
Send Comments to:
feedback@wirelessdevnet.com