Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/PhpWord/Shared/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static function addHtml($element, $html, $fullHTML = false, $preserveWhit
* @todo parse $stylesheet for default styles. Should result in an array based on id, class and element,
* which could be applied when such an element occurs in the parseNode function.
*/
self::$options = $options;
static::$options = $options;

// Preprocess: remove all line ends, decode HTML entity,
// fix ampersand and angle brackets and add body tag for HTML fragments
Expand All @@ -82,10 +82,10 @@ public static function addHtml($element, $html, $fullHTML = false, $preserveWhit
$dom = new DOMDocument();
$dom->preserveWhiteSpace = $preserveWhiteSpace;
$dom->loadXML($html);
self::$xpath = new DOMXPath($dom);
static::$xpath = new DOMXPath($dom);
$node = $dom->getElementsByTagName('body');

self::parseNode($node->item(0), $element);
static::parseNode($node->item(0), $element);
if (\PHP_VERSION_ID < 80000) {
libxml_disable_entity_loader($orignalLibEntityLoader);
}
Expand Down