Siebel eScript Language Reference > Methods Reference > Conversion Methods >

Convert Special Characters to URL Method


The Convert Special Characters to URL method replaces special characters that a string contains with character combinations so that Siebel CRM can use the string with a URL. It returns a modified string.

Format

escape(string)

Table 89 describes the arguments for the Convert Special Characters to URL method.

Table 89. Arguments for the Convert Special Characters to URL Method
Argument
Description

string

A string that contains the characters that this method replaces.

Usage

The character combinations include Unicode values. For a character in the standard ASCII set, this is the hexadecimal ASCII code of the character preceded by a percentage symbol (%). The standard ASCII set includes decimal values 0 through 127.

The following items remain in the string:

  • Uppercase letters
  • Lowercase letters
  • Numbers
  • Ampersand (@)
  • Asterisk (*)
  • Plus sign (+)
  • Underscore (_)
  • Period (.)
  • Forward slash (/)

This method replaces other characters with their respective Unicode sequence.

Example 1

The following example encodes a string. It does not replace the ampersand (@) or asterisk (*) characters:

var str = escape("@#$*96!");

This example provides the following result:

"@%23%24*96%21"

Example 2

The following example encodes a string:

var encodeStr = escape("@#$*%!");

This example provides the following result:

"@%23%24*%25%21"

Siebel eScript Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.