htmlpurifier
htmlpurifier copied to clipboard
Implement sip URI scheme
Just like https://github.com/ezyang/htmlpurifier/pull/87 did for 'tel' but for then for the proposed standard 'sip'.
Use case: our customer asks to allow the 'sip' protocol so she can make links that can be handled by Skype for business.
Todo:
- [ ] add 'sip' to library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt
- [ ] add library/HTMLPurifier/URIScheme/sip.php that validates according to 'sip's proposed standard https://tools.ietf.org/html/rfc3261
- [ ] add test coverage
Yeah, I'll accept a patch which implements sip as per the RFC.
Does it makes sense to implement placeholder uri scheme, that will allow to input any custom scheme from config?
Something like {custom: {'skype'}}.
Any app nowadays has it's own scheme and implementing each one takes too much time.
Some schemes can be used for nefarious ends (e.g., javascript:). Implementing the RFC makes you think about what the scheme does, and decide what actually is semantically acceptable in a document.