Writes the value with proper escaping based on the context of the tag. Supports data types beyond <c:out>.
In addition to the usual set of coercions expected for <c:out>, also supports writing XML nodes such as for HTML snippets.
The content type depends on the value provided to the type attribute, and defaults to text/plain
.
The content is checked for well-formedness based on its type:
css
ortext/css
- must be well-formed CSS content. (Note: Currently only checks character values.)javascript
,application/javascript
, ortext/javascript
- no validationjson
orapplication/json
- no validationld_json
orapplication/ld+json
- no validationtext
ortext/plain
- no validationurl
ortext/url
- must be a valid URLxhtml
orapplication/xhtml+xml
- must be well-formed XHTML content. (Note: Currently only checks character values.)xhtml_attribute
orapplication/xhtml+xml+attribute
- must be a valid XHTML attribute.mysql
ortext/x+mysql
- must be valid MySQL command "mysql" inputpsql
ortext/x+psql
- must be valid PostgreSQL command "psql" inputsh
ortext/x+sh
- must be valid shell script
This is compatible with <encoding:out>, with the addition of allowing nested <ao:value> and <ao:type> tags.
Tag Information
Tag Class: | com.aoapps.taglib.OutTag |
---|---|
TagExtraInfo Class: | com.aoapps.encoding.taglib.OutTagTEI |
Body Content: | scriptless |
Display Name: | None |
Attributes
Name | Required | Evaluation | Type | Description |
---|---|---|---|---|
value | No | Runtime | Object |
The value to be written. A nested <ao:value> tag will override this value. |
default | No | Deferred-Value | Object |
The default value if the resulting value is |
type | No | Runtime | Object |
Specifies the type of content contained in the value.
Defaults to |