htmlpurifier icon indicating copy to clipboard operation
htmlpurifier copied to clipboard

Implement sip URI scheme

Open PieterDC opened this issue 8 years ago • 3 comments

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

PieterDC avatar Jul 11 '17 15:07 PieterDC

Yeah, I'll accept a patch which implements sip as per the RFC.

ezyang avatar Jul 12 '17 03:07 ezyang

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.

diimpp avatar Aug 16 '18 10:08 diimpp

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.

ezyang avatar Nov 11 '18 23:11 ezyang