General developer forum

Problem with URL Schemes and Purify HTML / URL resource auto-open

 
Picture of Daniel Neis Araujo
Re: Problem with URL Schemes and Purify HTML / URL resource auto-open
Core developersParticularly helpful MoodlersPlugin developersTranslators

Hello,


many applications nowadays use custom schemes, such whatsapp and others.

Mooodle does not allow many of these new schemes, only old ones like mms and irc and so.

If we would like to allow more interoperability with current tools, it seems that this is an important step to fix.

I looked at the code and it seems that each scheme needs to be added to the AlloedSchemes for HTMLPurifier and also needs a class that validates it. You can take a look at https://github.com/moodle/moodle/compare/master...danielneis:MDL-59372 to see and example for adding the "MDL" scheme (with tests passing https://travis-ci.org/danielneis/moodle/jobs/297976735).

It would be nice if we could have a way for users or administrators to add other schemes without changing the Moodle code.

If you are interested in this, please take a look at MDL-59372

 
Average of ratings: Useful (1)