throw new ImplementationException(get_class($object), ITitledObject::class);
}
- $element->nodeValue = $object->getTitle();
+ $element->nodeValue = '';
+ $element->appendChild($element->ownerDocument->createTextNode($object->getTitle()));
}
}
}
$element = $text->ownerDocument->createElement('a');
$element->setAttribute('href', $link);
- $element->nodeValue = $link;
+ $element->appendChild($element->ownerDocument->createTextNode($link));
}
else {
return $matches[0];
}
// trim code block
- $element->nodeValue = StringUtil::trim($element->textContent);
+ $content = StringUtil::trim($element->textContent);
+ $element->nodeValue = '';
+ $element->appendChild($element->ownerDocument->createTextNode($content));
return $element;
}