diff --git a/CHANGELOG.md b/CHANGELOG.md index 8283d3bf..a076d27b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,18 @@ Yii Framework 2 apidoc extension Change Log =========================================== -3.0.3 under development +3.0.4 under development ----------------------- - no changes in this release. +3.0.3 under development +----------------------- + +- Bug #281: Fix encoding in non English guides (arogachev) + + 3.0.2 February 16, 2022 ----------------------- diff --git a/templates/bootstrap/GuideRenderer.php b/templates/bootstrap/GuideRenderer.php index 21a2bb63..6c69eb1a 100644 --- a/templates/bootstrap/GuideRenderer.php +++ b/templates/bootstrap/GuideRenderer.php @@ -31,14 +31,11 @@ public function render($files, $targetDir) { $types = array_merge($this->apiContext->classes, $this->apiContext->interfaces, $this->apiContext->traits); - $extTypes = []; foreach ($this->extensions as $k => $ext) { $extType = $this->filterTypes($types, $ext); if (empty($extType)) { unset($this->extensions[$k]); - continue; } - $extTypes[$ext] = $extType; } parent::render($files, $targetDir); diff --git a/templates/html/GuideRenderer.php b/templates/html/GuideRenderer.php index 1796e24e..e73d3ce4 100644 --- a/templates/html/GuideRenderer.php +++ b/templates/html/GuideRenderer.php @@ -164,6 +164,7 @@ public function getGuideReferences() */ protected function fixMarkdownLinks($content) { + $content = mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'); $doc = new DOMDocument(); $doc->loadHTML($content);