Function Updated 30 May 2026
stripTags(html)
Removes all tags from a string
Parameters
htmlstringrequiredHTML string to remove all tags from.
Returns
A string without HTML tags.
Example
Mixed HTML (or any text file) with inline JavaScript between hash signs.
#{
let html = "<a>Just <b>a</b> test</a>";
}#
<div>#docly.stripTags(html)#</div> The template above produces this output:
<div>Just a test</div>