I use the following fix for this bug. You have to override Magento 2 Page renderer. Create a model file in your module `Company/Module/Model/Page/Renderer.php`:
<?php
namespace Company\Module\Model\Page;
class Renderer extends \Magento\Framework\View\Page\Config\Renderer {
/**
* @return string
*/
public function renderTitle()
{
return '<title>' . $this->escaper->escapeHtml(__($this->pageConfig->getTitle()->get())) . '</title>' . "\n";
}
}
And then add a following line to the `etc/frontend/di.xml` file:
<preference for="Magento\Framework\View\Page\Config\Renderer" type="Company\Module\Model\Page\Renderer" />