Strip anything not in a tag #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have some data like this:
blah blah blah <iframe src="..." />I can't seem to figure out how to strip the
blah blah blahpart. Is that possible?You're probably thinking about it in the wrong way at least in SGML/XML/HTML5+ data outside of nodes are just plain text and you're not supposed to filter them out.
If you want to strip all plain text in tags, the following will work:
If you want to stip only plaintext at the root, that is not possible without modifying the code to provide parent tags for context to sanitizers