38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
|**wapp-set-cookie** _NAME_ _VALUE_|→|Set cookie _NAME_ to have _VALUE_|
|**wapp-clear-cookie** _NAME_|→|Delete cookie _NAME_|
|**wapp-cache-control** _CONTROL_|→|Set caching behavior of current page|
|**wapp-content-security-policy** _POLICY_|→|Set the CSP for the current page|
|**wapp-debug-env**|→|Return a text description of the Wapp environment|
|**wapp** {_TEXT_}|→|Append _TEXT_ without substitution|
|**wapp-unsafe** _TEXT_|→|Append _TEXT_ that contains nothing that needs to be escaped|
<a name="cgiparams"></a>
3.0 CGI Parameters [(More detail)](params.md#cgidetail)
------------------
>
|
>
|
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
|**wapp-set-cookie** _NAME_ _VALUE_|→|Set cookie _NAME_ to have _VALUE_|
|**wapp-clear-cookie** _NAME_|→|Delete cookie _NAME_|
|**wapp-cache-control** _CONTROL_|→|Set caching behavior of current page|
|**wapp-content-security-policy** _POLICY_|→|Set the CSP for the current page|
|**wapp-debug-env**|→|Return a text description of the Wapp environment|
|**wapp** {_TEXT_}|→|Append _TEXT_ without substitution|
|**wapp-unsafe** _TEXT_|→|Append _TEXT_ that contains nothing that needs to be escaped|
|**wapp-crash-handler**|→|Invoked by Wapp, if it exists, when a TCL error occurs|
<a name="cgiparams"></a>
3.0 CGI Parameters [(More detail)](params.md#cgidetail)
------------------
>
|
92
93
94
95
96
97
98
|
https://wapp.tcl.tk/demo/env.tcl/abc/def/ghi?a=5&b=22.425#point42
\__________________________________/ \__________/
| |
SELF_URL QUERY_STRING
>
SCRIPT_FILENAME := DOCUMENT_ROOT + SCRIPT_NAME
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
https://wapp.tcl.tk/demo/env.tcl/abc/def/ghi?a=5&b=22.425#point42
\__________________________________/ \__________/
| |
SELF_URL QUERY_STRING
>
SCRIPT_FILENAME := DOCUMENT_ROOT + SCRIPT_NAME
<a name="subst"></a>
5.0 Substitutions In wapp-subst and wapp-trim
---------------------------------------------
>
|<b>%html(</b><i>EXPR</i><b>)</b>|→|Escape <i>EXPR</i> for display as HTML|
|<b>%url(</b><i>EXPR</i><b>)</b>|→|Escape <i>EXPR</i> for use as a URL|
|<b>%qp(</b><i>EXPR</i><b>)</b>|→|Escape <i>EXPR</i> for use as a URL query parameter|
|<b>%string(</b><i>EXPR</i><b>)</b>|→|Escape <i>EXPR</i> for use as a JSON string|
|<b>%unsafe(</b><i>EXPR</i><b>)</b>|→|Render <i>EXPR</i> exacatly - no escaping|
If <i>EXPR</i> contains a ")" character, then use these forms instead:
>
|<b>%html%(</b><i>EXPR</i><b>)%</b>|→|Escape <i>EXPR</i> for display as HTML|
|<b>%url%(</b><i>EXPR</i><b>)%</b>|→|Escape <i>EXPR</i> for use as a URL|
|<b>%qp%(</b><i>EXPR</i><b>)%</b>|→|Escape <i>EXPR</i> for use as a URL query parameter|
|<b>%string%(</b><i>EXPR</i><b>)%</b>|→|Escape <i>EXPR</i> for use as a JSON string|
|<b>%unsafe%(</b><i>EXPR</i><b>)%</b>|→|Render <i>EXPR</i> exacatly - no escaping|
|