"Hello"
gets inserted into the p
tag, but the name
gets concatonated after the closing tag. To get the name
inside the p
tag, we need to put brackets around the content:CDATA
- will generate a <![CDATA[ ... ]]>
section with the content contained.__
- (double underscore) will generate a <!-- ... -->
comment block.cp.web.html.is(value) -> boolean
value
is an cp.web.html
block.true
if it is an HTML block, or false
otherwise.cp.web.html:append(newContent[, escaped]) -> self
escaped
value will override any default escaping for the content type.newContent
may be almost any value. The default handling is below: cp.web.html
instance: Any other HTML block can be added. Default escaping: false
. function
: Functions will be executed every time the HTML block is converted to a string. Default escaping: whatever the default is for the returned value. list
: Tables which are lists will be iterrated and each item will be evaluated each time the HTML block is converted to a string. Default escaping: the default for each item. everything else: Converted to a string via the tostring
function. Default escaping: true
.cp.web.html:prepend(newContent[, escaped]) -> self
escaped
value will override any default escaping for the content type.newContent
may be almost any value. The default handling is below: cp.web.html
instance: Any other HTML block can be added. Default escaping: false
. function
: Functions will be executed every time the HTML block is converted to a string. Default escaping: whatever the default is for the returned value. list
: Tables which are lists will be iterrated and each item will be evaluated each time the HTML block is converted to a string. Default escaping: the default for each item. everything else: Converted to a string via the tostring
function. Default escaping: true
.