apostrophecms / sanitize-html

Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis. Built on htmlparser2 for speed and tolerance
MIT License
3.68k stars 349 forks source link

href disappears when format like "#some-text" or "/some-text" #551

Closed pcristov closed 2 years ago

pcristov commented 2 years ago

Hello,

I'm using v2.7.0. Is there a way to allow href content to have a format like "#some-text" or "/some-text"? I'm currently dealing with the undesired outcome of <a href="#some-text"> and <a href="/some-text"> becoming <a>.

Thank you very much in advance.

Pedro