Wapp

Check-in [b25f6825c5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix minor problems with the two self-scripts.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b25f6825c5fac719acc52b031c71f369afae533b75919226a3dd4db2e7b23e29
User & Date: drh 2018-02-08 04:42:15
Context
2018-02-08
12:15
Typos from Andreas. Added the file-upload test to test01.tcl. check-in: e17c170f16 user: drh tags: trunk
04:42
Fix minor problems with the two self-scripts. check-in: b25f6825c5 user: drh tags: trunk
02:17
Add she-bangs to the self.tcl and self2.tcl examples. check-in: 654ca1127b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to examples/self.tcl.

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  common-header
  wapp-trim {
    <h1>Wapp Self-Display Demo</h1>
    <ul>
    <li> <a href='%url([wapp-param SCRIPT_NAME])/self'>Show the script
    that generates this page</a>
    <li> <a href='%url([wapp-param SCRIPT_NAME])/env'>Wapp Environment</a>
    </ol>
  }
  common-footer
}
proc wapp-page-env {} {
  common-header
  wapp-trim {
    <h1>Wapp Environment</h1>







|







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  common-header
  wapp-trim {
    <h1>Wapp Self-Display Demo</h1>
    <ul>
    <li> <a href='%url([wapp-param SCRIPT_NAME])/self'>Show the script
    that generates this page</a>
    <li> <a href='%url([wapp-param SCRIPT_NAME])/env'>Wapp Environment</a>
    </ul>
  }
  common-footer
}
proc wapp-page-env {} {
  common-header
  wapp-trim {
    <h1>Wapp Environment</h1>

Changes to examples/self2.tcl.

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# to enable in-line CSS.  In-line CSS is off by default.
#
# Also notice that the "wapp-allow-xorigin-params" command had to be used
# to enable users to manually add new color= query parameters.
#
package require wapp
proc wapp-default {} {
  wapp-content-security-policy {default_src 'self' 'inline'}
  wapp-allow-xorigin-params
  set fd [open [wapp-param SCRIPT_FILENAME] rb]
  set script [read $fd]
  close $fd
  set self [wapp-param SELF_URL]
  wapp-trim {
    <html>







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# to enable in-line CSS.  In-line CSS is off by default.
#
# Also notice that the "wapp-allow-xorigin-params" command had to be used
# to enable users to manually add new color= query parameters.
#
package require wapp
proc wapp-default {} {
  wapp-content-security-policy {default-src 'self' 'unsafe-inline'}
  wapp-allow-xorigin-params
  set fd [open [wapp-param SCRIPT_FILENAME] rb]
  set script [read $fd]
  close $fd
  set self [wapp-param SELF_URL]
  wapp-trim {
    <html>