diff --git a/scheme/httpd/surflets/surflet-sxml.scm b/scheme/httpd/surflets/surflet-sxml.scm index 0ce413f..e790c6f 100644 --- a/scheme/httpd/surflets/surflet-sxml.scm +++ b/scheme/httpd/surflets/surflet-sxml.scm @@ -12,6 +12,9 @@ *preorder* . ,(lambda (tag . text) text))) +(define nbsp-rule + `(nbsp . ,(lambda (_) " "))) + (define comment-rule `(*COMMENT* *preorder* . ,(lambda (tag . elems) @@ -25,7 +28,8 @@ ,text-rule ,comment-rule ,url-rule - ,plain-html-rule)) + ,plain-html-rule + ,nbsp-rule)) (define surflet-form-rule `(surflet-form @@ -58,7 +62,8 @@ *preorder* . ,(lambda (trigger input-field) (surflet-sxml->low-level-sxml - (input-field-html-tree input-field))))) + ;; We need a real input-field for input-field-html-tree. + (input-field-html-tree (list trigger input-field)))))) (define surflet-sxml-rules `(,@default-rules