Skip to content

Commit

Permalink
1.2.1, check changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico Kaltofen committed Jul 12, 2018
1 parent f1d45c3 commit 5ed083a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.2.1] - 2018-07-12

### Fixed
- disable error reporting when potential using HTML5 tags while using `hyphenateHtml`

## [1.2.0] - 2018-07-12

### Changed
Expand Down
2 changes: 2 additions & 0 deletions src/Hyphenator/FrontendHyphenator.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ function ($node, $i) use ($h, &$cache, $cacheEnabled) {

// if html contains nested tags, use the hyphenateHtml that excludes HTML tags and attributes
if ($html != strip_tags($html)) {
libxml_use_internal_errors(true); // disable error reporting when potential using HTML5 tags
$html = $h->hyphenateHtml($html);
libxml_clear_errors();

if (false === preg_match('#<body>(<p>)?(?<content>.+?)(<\/p>)?<\/body>#is', $html, $matches) || !isset($matches['content'])) {
return $node;
Expand Down

0 comments on commit 5ed083a

Please sign in to comment.