bevacqua / insane

:pouting_cat: Lean and configurable whitelist-oriented HTML sanitizer
https://ponyfoo.com
MIT License
445 stars 22 forks source link

HTML Parser should handle multiple attributes without spaces #28

Open Howell5 opened 2 months ago

Howell5 commented 2 months ago
const testHtml = '<a target="_blank" rel="noopener noreferrernofollow"href="https://tusi.cn/u/639278639053211787"><strong>→→→→→→more←←←←←←</strong></a>'

const result  = insane(testHtml)

console.log({result}) // it will be '', not the result i expect '<a target="_blank" href="https://tusi.cn/u/639278639053211787"><strong>→→→→→→more←←←←←←</strong></a>'
Howell5 commented 2 months ago
const testHtml = '<a target="_blank" rel="noopener noreferrernofollow"href="https://tusi.cn/u/639278639053211787"><strong>→→→→→→more←←←←←←</strong></a>'

const result  = insane(testHtml)

console.log({result}) // it will be '', not the result i expect '<a target="_blank" href="https://tusi.cn/u/639278639053211787"><strong>→→→→→→more←←←←←←</strong></a>'

rel="noopener noreferrernofollow"href="https://tusi.cn/u/639278639053211787" dont have space.