Index: html-filter.scm
==================================================================
--- html-filter.scm
+++ html-filter.scm
@@ -58,11 +58,11 @@
(define (s:html-filter->string input-text allowed-tags)
(let ((ostr (open-output-string)))
;;; (s:output-new ostr (s:html-filter input-text allowed-tags))
(s:output-new ostr (car (eval (s:html-filter input-text allowed-tags))))
- (get-output-string ostr)))
+ (string-chomp (get-output-string ostr)))) ;; don't need the linefeed, could stop adding it ...
;; (if (null? rem)
;; res '())
;; (s:toks->stml (if (list? res) res '()) #f rem allowed-tags))))
Index: session.scm
==================================================================
--- session.scm
+++ session.scm
@@ -727,11 +727,11 @@
;; This one will get the first value found regardless of form
;; param: (dtype [tag1 tag2 ...])
;; dtype:
;; 'raw : do no conversion
;; 'number : convert to number, return #f if fails
-;; 'escaped : use html-escape to protect the input
+;; 'escaped : use html-escape to protect the input -- this is the default
;;
(define (session:get-input self key params)
(let* ((dtype (if (null? params)
'escaped
(car params)))
@@ -750,11 +750,13 @@
(session:log self "ERROR: bad key " key)
#f)))))
(case dtype
((raw) res)
((number) (if (string? res)(string->number res) #f))
- ((escaped) (s:html-filter res tags))
+ ((escaped) (if (string? res)
+ (s:html-filter res tags)
+ res))
(else (if (string? res)
(s:html-filter res '())
res)))))
;; This one will get the first value found regardless of form