html.components: For the t:html tag, only wrap strings in unescaped so that other objects can render.

db4
Doug Coleman 2011-11-06 12:15:00 -08:00
parent ff0784ae8e
commit bc7162743c
2 changed files with 14 additions and 2 deletions

View File

@ -1,7 +1,7 @@
USING: tools.test kernel io.streams.string
io.streams.null accessors inspector html.streams
html.components html.forms namespaces
xml.writer ;
xml.writer xml.syntax ;
FROM: html.components => inspector ;
IN: html.components.tests
@ -196,3 +196,15 @@ M: link-test link-href drop "http://www.apple.com/foo&bar" ;
[ ] [
"error" hidden render
] unit-test
! Test xml in html components
[ ] [
[XML <foo/> XML] "xmltest" set-value
] unit-test
[ "<foo/>" ] [
[
"xmltest" html render
] with-string-writer
] unit-test

View File

@ -190,7 +190,7 @@ M: comparison render*
! HTML component
SINGLETON: html
M: html render* 2drop <unescaped> ;
M: html render* 2drop dup string? [ <unescaped> ] when ;
! XML component
SINGLETON: xml