protected function PageProcessor::cleanupContent in Mini site 8
Cleanup content of the page before loading it int internal document.
1 call to PageProcessor::cleanupContent()
- PageProcessor::loadDocument in src/
PageProcessor.php - Load document from the string.
File
- src/
PageProcessor.php, line 284
Class
- PageProcessor
- Class PageProcessor.
Namespace
Drupal\minisiteCode
protected function cleanupContent($content) {
$content = preg_replace('/\\<meta\\s+http-equiv\\s*=\\s*\\"content-type\\"\\s+content\\s*=\\s*\\".*charset=ISO-8859-1\\"\\s*(\\/?)\\>/i', '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">', $content);
$content = mb_convert_encoding($content, 'HTML-ENTITIES', "UTF-8");
return $content;
}