diff --git a/CHANGELOG b/CHANGELOG index 6d658a191..bc0e5f61e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ CHANGELOG Roundcube Webmail =========================== - Fix rewind(): stream does not support seeking (#5950) +- Fix bug where HTML messages could have been rendered empty on some systems (#5957) RELEASE 1.2.6 ------------- diff --git a/program/lib/Roundcube/rcube_washtml.php b/program/lib/Roundcube/rcube_washtml.php index 9f357904a..5358e4b48 100644 --- a/program/lib/Roundcube/rcube_washtml.php +++ b/program/lib/Roundcube/rcube_washtml.php @@ -289,17 +289,17 @@ class rcube_washtml } } - if ($this->is_image_attribute($node->tagName, $key)) { + if ($this->is_image_attribute($node->nodeName, $key)) { $out = $this->wash_uri($value, true); } - else if ($this->is_link_attribute($node->tagName, $key)) { + else if ($this->is_link_attribute($node->nodeName, $key)) { if (!preg_match('!^(javascript|vbscript|data:text)!i', $value) && preg_match('!^([a-z][a-z0-9.+-]+:|//|#).+!i', $value) ) { $out = $value; } } - else if ($this->is_funciri_attribute($node->tagName, $key)) { + else if ($this->is_funciri_attribute($node->nodeName, $key)) { if (preg_match('/^[a-z:]*url\(/i', $val)) { if (preg_match('/^([a-z:]*url)\(\s*[\'"]?([^\'"\)]*)[\'"]?\s*\)/iu', $value, $match)) { if ($url = $this->wash_uri($match[2])) { @@ -432,14 +432,14 @@ class rcube_washtml do { switch ($node->nodeType) { case XML_ELEMENT_NODE: //Check element - $tagName = strtolower($node->tagName); + $tagName = strtolower($node->nodeName); if ($callback = $this->handlers[$tagName]) { $dump .= call_user_func($callback, $tagName, $this->wash_attribs($node), $this->dumpHtml($node, $level), $this); } else if (isset($this->_html_elements[$tagName])) { $content = $this->dumpHtml($node, $level); - $dump .= '<' . $node->tagName; + $dump .= '<' . $node->nodeName; if ($tagName == 'svg') { $xpath = new DOMXPath($node->ownerDocument); @@ -459,14 +459,14 @@ class rcube_washtml $dump .= ' />'; } else { - $dump .= '>' . $content . 'tagName . '>'; + $dump .= '>' . $content . 'nodeName . '>'; } } else if (isset($this->_ignore_elements[$tagName])) { - $dump .= ''; + $dump .= ''; } else { - $dump .= ''; + $dump .= ''; $dump .= $this->dumpHtml($node, $level); // ignore tags not its content } break;