There are alot of erroneous "Suspicious attribute 'href'" in the log ( $xmlIssues )
This makes it difficult to use the function getXmlIssues() the check if an svg string was correct.
This is caused by $element->getAttribute('href') returning an empty string for elements that doesn't have a href attribute, in combination with the function isHrefSafeValue saying that empty href aren't safe.
Adding an empty check to the function isHrefSafeValue solves this problem.
There are alot of erroneous "Suspicious attribute 'href'" in the log ( $xmlIssues ) This makes it difficult to use the function getXmlIssues() the check if an svg string was correct.
This is caused by $element->getAttribute('href') returning an empty string for elements that doesn't have a href attribute, in combination with the function isHrefSafeValue saying that empty href aren't safe.
Adding an empty check to the function isHrefSafeValue solves this problem.
//Allow empty URI.
if (empty($value)){
return true;
}