summaryrefslogtreecommitdiff
path: root/tests/url.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-02 18:20:15 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-02 18:20:15 -0400
commitfeaf5cca383eef7caf103f6f3fd4a93725f6667b (patch)
tree0baf5761c294a6cf6f12d93b16849bec6a4eb9cd /tests/url.ur
parent231c4bfd8d410f01f98801dff7a159068c552c64 (diff)
Runtime URL and MIME type filtering
Diffstat (limited to 'tests/url.ur')
-rw-r--r--tests/url.ur9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/url.ur b/tests/url.ur
index c45681e0..ea236502 100644
--- a/tests/url.ur
+++ b/tests/url.ur
@@ -1,12 +1,11 @@
-val url = "http://www.yahoo.com/"
-
fun readersChoice r = return <xml><body>
- <a href={bless r.Url}>Your pick, boss</a>
+ {case checkUrl r.Url of
+ None => <xml>I can't do that, Dave.</xml>
+ | Some url => <xml><a href={url}>Your pick, boss</a></xml>}
</body></xml>
fun main () : transaction page = return <xml><body>
- <a href="http://www.google.com/">Google!</a>
- <a href={bless url}>Yahoo!</a><br/>
+ <a href="http://en.wikipedia.org/wiki/Wikipedia:About">Learn</a>
<br/>
<form><textbox{#Url}/> <submit action={readersChoice}/></form>