diff --git a/CHANGELOG.md b/CHANGELOG.md index c6f0e3b8..d6df064a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,12 @@ None yet. None yet. +## 0.11.1 - 2 June 2014 + +This is an immediate bugfix release for HTML reader. + +- HTML Reader: `

` and header tags puts no output - @canyildiz @ivanlanin GH-257 + ## 0.11.0 - 1 June 2014 This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four new elements were added: TextBox, ListItemRun, Field, and Line. Relative and absolute positioning for images and textboxes were added. Writer classes were refactored into parts, elements, and styles. ODT and RTF features were enhanced. Ability to add elements to PHPWord object via HTML were implemented. RTF and HTML reader were initiated. diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index 83292a3a..8abfea2f 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -224,9 +224,12 @@ class Html private static function parseText($node, $element, &$styles) { $styles['font'] = self::parseInlineStyle($node, $styles['font']); - if (method_exists($element, 'addText')) { + + // Commented as source of bug #257. `method_exists` doesn't seems to work properly in this case. + // @todo Find better error checking for this one + // if (method_exists($element, 'addText')) { $element->addText($node->nodeValue, $styles['font'], $styles['paragraph']); - } + // } return null; }