codsen / codsen

a monorepo of npm packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

False positive tag detection to "a<b and c>d" resulting to "a d"

guillermodiazga opened this issue · comments

Package's name
stripHtml

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
False positive tag detection to "ad" resulting to "a d"

Also if you try using "a<b" the result is wrong "a"

Expected behavior
When there's only '<' should preserved the content

hi! Thank you for raising this. Since original inception the algorithm got more and more complex, in the end we chose to go belt-and-braces and strip tags more aggressively because un-encoded brackets should be flagged up by linters anyway. I've removed references to this old example from readme.

Would stripping the <b from H4<bE77]7oQL fall into the same category?

@mherger hm, not really. Thank you for reporting, I created #20 for that.