From a73b7da2ec8ceaf6716ed8e6a3041bfee726f71a Mon Sep 17 00:00:00 2001 From: bastei Date: Fri, 6 Sep 2013 19:06:22 +0200 Subject: curly braces are beautiful --- utility/articleenhancer/articleenhancer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'utility') diff --git a/utility/articleenhancer/articleenhancer.php b/utility/articleenhancer/articleenhancer.php index c9b61a135..e0d60d4c4 100644 --- a/utility/articleenhancer/articleenhancer.php +++ b/utility/articleenhancer/articleenhancer.php @@ -63,10 +63,11 @@ abstract class ArticleEnhancer { // convert encoding by detecting charset from header $contentType = $file->headers['content-type']; - if( preg_match( '/(?<=charset=)[^;]*/', $contentType, $matches ) ) + if( preg_match( '/(?<=charset=)[^;]*/', $contentType, $matches ) ) { $body = mb_convert_encoding($file->body, 'HTML-ENTITIES', $matches[0]); - else + } else { $body = $file->body; + } $dom = new \DOMDocument(); @$dom->loadHTML($body); -- cgit v1.2.3