Usage

Syntax: string.escape()
Returns string.

Explanation

An escape character is a character or sequence of characters that is taken to represent something other than the literal characters. Usually, the characters that require escape sequences are hard to represent (tabs, newlines, carriage returns, etc.). These escape sequences include \n, \t, \", and others. The escape method replaces literal characters with its escape characters so that a string may be more easily ported elsewhere. It can be used to prevent SQL injection for servers with SQLite enabled.

Example

function onCreated()
{
  temp.foo = "Hello 'World'!";
  echo(temp.foo.escape());
}

... Will echo "Hello \'World\'!".

Refer to

http://forums.graalonline.com/forums/showpost.php?p=1483345&postcount=36

Categories

CategoryObjectFunction
CategoryFunctionClientside
CategoryFunctionServerside

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki