aboutsummaryrefslogtreecommitdiffstats
path: root/test/tests.lisp
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-05-29 19:14:11 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-05-29 19:14:11 -0700
commit271e541893c4d10b3b4fa8f20cb6c54f0af2527e (patch)
treed88068ca91fffbacc04359e8084b90551ea884fe /test/tests.lisp
parentff4671eca8e75611a76368eb3f3a3dde334ddb80 (diff)
downloadtl-who-271e541893c4d10b3b4fa8f20cb6c54f0af2527e.tar.gz
tl-who-271e541893c4d10b3b4fa8f20cb6c54f0af2527e.tar.bz2
tl-who-271e541893c4d10b3b4fa8f20cb6c54f0af2527e.zip
Fix CL-WHO attr bugs: no escaping, poor constant handling.
CL-WHO tries to handle the case when attribute values are constant NIL and T values, but it bungles it; it applies the correct behavior only when the constants are literally these symbols, not when they are constant expressions which evaluate to these values. Secondly, CL-WHO neglects to HTML-escape attribute values. We fix this behavior and introduce a noesc operator to selectively revert it, as well as a *cl-who-compat* special to revert the behavior more pervasively, for the daredevils. * packages.tl (tl-who): New symbols *cl-who-compat* and noesc. * specials.tl (*cl-who-compat*): New special variable. * who.tl (convert-attributes): When treating a constant expression, evaluate it first, then check for nil or t. Escape interpolated text with html-encode. Check the original expression for (noesc ...) pattern, or the presence of *cl-who-compat*. In these cases, don't generate the escape call. * test/simple.tl: New tests 28 to 37 providing some coverage to all these changes. * README.md: Document.
Diffstat (limited to 'test/tests.lisp')
0 files changed, 0 insertions, 0 deletions