diff --git a/basis/html/components/components-docs.factor b/basis/html/components/components-docs.factor index b432cc0cc6..37dbeba6c1 100644 --- a/basis/html/components/components-docs.factor +++ b/basis/html/components/components-docs.factor @@ -57,7 +57,10 @@ HELP: hidden { $description "Hidden components render as a hidden form field. For example, a page for editing a weblog post might contain a hidden field with the post ID." } ; HELP: html -{ $description "HTML components render HTML verbatim, without any escaping. Care must be taken to only render trusted input, to avoid cross-site scripting attacks." } ; +{ $description "HTML components render HTML verbatim from a string, without any escaping. Care must be taken to only render trusted input, to avoid cross-site scripting attacks." } ; + +HELP: xml +{ $description "XML components render XML verbatim, from an XML chunk. Care must be taken to only render trusted input, to avoid cross-site scripting attacks." } ; HELP: inspector { $description "Inspector components render an arbitrary object by passing it to the " { $link describe } " word." } ; @@ -90,6 +93,7 @@ $nl { $subsection inspector } { $subsection comparison } { $subsection html } +{ $subsection xml } "Tuple components:" { $subsection field } { $subsection password } diff --git a/basis/html/components/components.factor b/basis/html/components/components.factor index 2b18e28351..9dddb85619 100644 --- a/basis/html/components/components.factor +++ b/basis/html/components/components.factor @@ -171,3 +171,8 @@ M: comparison render* SINGLETON: html M: html render* 2drop ; + +! XML component +SINGLETON: xml + +M: xml render* 2drop ; diff --git a/basis/html/templates/chloe/chloe-docs.factor b/basis/html/templates/chloe/chloe-docs.factor index 18e6db66f6..fcfd454478 100644 --- a/basis/html/templates/chloe/chloe-docs.factor +++ b/basis/html/templates/chloe/chloe-docs.factor @@ -1,8 +1,8 @@ IN: html.templates.chloe -USING: help.markup help.syntax html.components html.forms +USING: xml.data help.markup help.syntax html.components html.forms html.templates html.templates.chloe.syntax html.templates.chloe.compiler html.templates.chloe.components -math xml.data strings quotations namespaces ; +math strings quotations namespaces ; HELP: { $values { "path" "a pathname string without the trailing " { $snippet ".xml" } " extension" } { "chloe" chloe } } @@ -70,6 +70,7 @@ ARTICLE: "html.templates.chloe.tags.component" "Component Chloe tags" { { $snippet "t:field" } { $link field } } { { $snippet "t:hidden" } { $link hidden } } { { $snippet "t:html" } { $link html } } + { { $snippet "t:xml" } { $link xml } } { { $snippet "t:inspector" } { $link inspector } } { { $snippet "t:label" } { $link label } } { { $snippet "t:link" } { $link link } } diff --git a/basis/html/templates/chloe/chloe.factor b/basis/html/templates/chloe/chloe.factor index eafa3c3a5d..439b207063 100644 --- a/basis/html/templates/chloe/chloe.factor +++ b/basis/html/templates/chloe/chloe.factor @@ -95,6 +95,7 @@ COMPONENT: password COMPONENT: choice COMPONENT: checkbox COMPONENT: code +COMPONENT: xml SYMBOL: template-cache