mirror of
https://github.com/typecho/typecho.git
synced 2025-03-25 12:29:43 +01:00
修正评论乱码
This commit is contained in:
parent
ee9958def5
commit
ed4ca7fd0b
@ -578,9 +578,12 @@ EOF;
|
||||
|
||||
if (empty($dom)) {
|
||||
$dom = new DOMDocument('1.0', self::$charset);
|
||||
$dom->encoding = self::$charset;
|
||||
$dom->xmlStandalone = false;
|
||||
}
|
||||
@$dom->loadHTML('<?xml encoding="UTF-8">' . $html);
|
||||
@$dom->loadHTML('<?xml encoding="' . self::$charset . '">'
|
||||
. '<head><meta http-equiv="Content-Type" content="text/html; charset=' . self::$charset . '"/></head><body>'
|
||||
. $html . '</body>');
|
||||
|
||||
foreach($dom->getElementsByTagName('*') as $node){
|
||||
$tagName = strtolower($node->tagName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user