Browse Source

Remove lowercasing of namespace URIs

split-manual
Dustin Wilson 3 years ago
parent
commit
3389903957
  1. 4
      lib/DOM/Document.php
  2. 2
      lib/DOM/Element.php

4
lib/DOM/Document.php

@ -54,7 +54,7 @@ class Document extends \DOMDocument {
public function createAttributeNS($namespaceURI, $qualifiedName) {
// Normalize the attribute name and namespace URI per modern DOM specifications.
if ($namespaceURI !== null) {
$namespaceURI = strtolower(trim($namespaceURI));
$namespaceURI = trim($namespaceURI);
}
$qualifiedName = trim($qualifiedName);
@ -97,7 +97,7 @@ class Document extends \DOMDocument {
public function createElementNS($namespaceURI, $qualifiedName, $value = "") {
// Normalize the element name and namespace URI per modern DOM specifications.
if ($namespaceURI !== null) {
$namespaceURI = strtolower(trim($namespaceURI));
$namespaceURI = trim($namespaceURI);
$namespaceURI = ($namespaceURI === Parser::HTML_NAMESPACE) ? null : $namespaceURI;
}
$qualifiedName = trim($qualifiedName);

2
lib/DOM/Element.php

@ -90,7 +90,7 @@ class Element extends \DOMElement {
public function setAttributeNS($namespaceURI, $qualifiedName, $value) {
// Normalize the attribute name and namespace URI per modern DOM specifications.
if ($namespaceURI !== null) {
$namespaceURI = strtolower(trim($namespaceURI));
$namespaceURI = trim($namespaceURI);
}
$qualifiedName = trim($qualifiedName);

Loading…
Cancel
Save