The class within Kirby core’s Sane/Xml.php defines a static property with an array of domains that are accepted for URLs as href
attribute values by the sanitizer function for uploaded XML files. It’s an empty array by default, i.e. validation fails on all href
attributes with any URL:
namespace Kirby\Sane;
...
class Xml extends Handler
{
...
public static $allowedDomains = [];
Is there some way I can override this property from within a plugin, hook or the like? Something like Xml::$allowedDomains = ['garmin.com']
to replace that default empty array with values that suit my project? And, if technically possible to start with: where would I place such line of code?
Thank you!
(…related to this issue, which only later occured to me might be not a Kirby issue as much as a reflection of my OOP understanding’s boundaries?)