summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2018-10-19 16:48:45 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2018-10-19 16:48:45 -0400
commited803fdc31115945a105626faab6bd302785f0e7 (patch)
tree5f716c702b8700037a24c0970ecd18d6764a0274 /tests
parentabd0bdd9518b8ed9e9b0ad0a0c1059760b0ec5ce (diff)
Block scary types for [de]serialization (closes #98)
Diffstat (limited to 'tests')
-rw-r--r--tests/serializingXml.ur14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/serializingXml.ur b/tests/serializingXml.ur
new file mode 100644
index 00000000..34eb3436
--- /dev/null
+++ b/tests/serializingXml.ur
@@ -0,0 +1,14 @@
+fun alerts n =
+ if n <= 0 then
+ return ()
+ else
+ (alert ("Alert #" ^ show n);
+ alerts (n - 1))
+
+cookie uhoh : serialized xbody
+
+fun main () : transaction page =
+ setCookie uhoh {Value = serialize <xml><active code={alerts 3; return <xml>Yay!</xml>}/></xml>,
+ Expires = None,
+ Secure = False};
+ return <xml></xml>