From 0f880e6931e27b8d3d46023b01542af4c376d246 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Tue, 9 Jun 2015 12:34:10 -0700 Subject: [PATCH] correct handling of style & script blocks --- txexpr/tests.rkt | 2 +- typed/txexpr/main.rkt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/txexpr/tests.rkt b/txexpr/tests.rkt index 041ca96..3b74fa4 100644 --- a/txexpr/tests.rkt +++ b/txexpr/tests.rkt @@ -196,4 +196,4 @@ (list '(root (div "foo") "hello" "world" (div "foo") (em "goodnight" "moon" (div "foo"))) '((meta "foo" "bar") (meta "foo2" "bar2") (meta "foo3" "bar3")))) (check-equal? (xexpr->html '(root (script "3 > 2") "Why is 3 > 2?")) - "Why is 3 > 2?")) \ No newline at end of file + "Why is 3 > 2?")) \ No newline at end of file diff --git a/typed/txexpr/main.rkt b/typed/txexpr/main.rkt index 235a4e1..f87448b 100644 --- a/typed/txexpr/main.rkt +++ b/typed/txexpr/main.rkt @@ -240,7 +240,7 @@ (Xexpr -> Xexpr) (cond [(cdata? x) x] - [(string? x) (cdata #f #f (format "" x))] + [(string? x) (cdata #f #f x)] ; don't use "![CDATA[...]]" wrapper in HTML, it's not consistent with the spec [else x])) (xexpr->string (let: loop : Xexpr ([x : Xexpr x]) (cond