function phutil_tag($tag, $attributes, $content)Phorge Technical Documentation (Remarkup)
function phutil_tag($tag, $attributes, $content)
Phorge Technical Documentation (Remarkup)
Render an HTML tag in a way that treats user content as unsafe by default.
Tag rendering has some special logic which implements security features:
- When rendering <a> tags, if the rel attribute is not specified, it is interpreted as rel="noreferrer".
- When rendering <a> tags, the href attribute may not begin with javascript:.
These special cases can not be disabled.
IMPORTANT: The $tag attribute and the keys of the $attributes array are
trusted blindly, and not escaped. You should not pass user data in these
parameters.
Parameters
string | $tag | The name of the tag, like `a` or `div`. |
map<string, | $attributes | string> A map of tag attributes. |
wild | $content | Content to put in the tag. |
Return
PhutilSafeHTML | Tag object. |