forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathURLEncode.xml
More file actions
49 lines (49 loc) · 2.87 KB
/
Copy pathURLEncode.xml
File metadata and controls
49 lines (49 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<doc>
<legacy_id>2027</legacy_id>
<name>URLEncode</name>
<type>function</type>
<syntax>
<example>the URLEncode of <i>formString</i></example>
<example>URLEncode(<i>formString</i>)</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Text and Data Processing</category>
<category>Networks & Communication</category>
</classification>
<references>
<command tag="post">post Command</command>
</references>
<history>
<introduced version="1.0">Added.</introduced>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
<network/>
</security>
<summary><glossary tag="return">Returns</glossary> a <keyword tag="string">string</keyword> that has been transformed so that it can be posted to an <keyword tag="http">HTTP</keyword> <glossary tag="server">server</glossary> as a <keyword tag="URL">URL</keyword>.</summary>
<examples>
<example>URLEncode("ABC123") <code><i>-- returns "ABC123"</i></code></example>
<example>URLEncode("Test string $$") <code><i>-- returns "Test+string+%24%24"</i></code></example>
<example>put URLEncode("http://www.example.net/document.html") into newURL</example>
</examples>
<description>
<p>Use the <b>URLEncode</b> <control_st tag="function">function</control_st> to <glossary tag="encode">encode</glossary> a <keyword tag="URL">URL</keyword> so it can be safely posted to an <keyword tag="http">HTTP</keyword> <glossary tag="server">server</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>formString</i> is any <keyword tag="string">string</keyword>, or any <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a <keyword tag="string">string</keyword>.</p><p/><p><b>Value:</b></p><p>The <b>URLEncode</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> the <i>formString</i>, with spaces converted to "<code>+</code>" and characters other than letters and numbers converted to their hexadecimal <glossary tag="Escape key">escape</glossary> representation.</p><p/><p><b>Comments:</b></p><p>Letters and numbers (alphanumeric characters) are not transformed by the <b>URLEncode</b> <control_st tag="function">function</control_st>. The representation used for non-alphanumeric characters is a percent sign followed by two <glossary tag="hexadecimal">hexadecimal</glossary> digits. For example, the <glossary tag="ASCII">ASCII value</glossary> of the <keyword tag="character">character</keyword> <code> ~ </code>is 126; the hexadecimal equivalent of 126 is 7E. So wherever the <keyword tag="character">character</keyword> <code> ~ </code><a/>appears in the formString, it is converted to "<code>%7E</code>".</p>
</description>
</doc>