Reindent. re #55
這個提交存在於:
父節點
893855a81d
當前提交
16c85418c0
共有 1 個檔案被更改,包括 8 行新增 和 7 行删除
15
base.php
15
base.php
|
@ -68,13 +68,14 @@ function are_libxml_errors_ok ()
|
|||
function html2xhtml ($html) {
|
||||
$doc = new DOMDocument();
|
||||
libxml_use_internal_errors(true);
|
||||
$doc->loadHTML('<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>' .
|
||||
$html . '</body></html>'); // Load the HTML
|
||||
$output = $doc->saveXML($doc->documentElement); // Transform to an Ansi xml stream
|
||||
$output = xml2xhtml($output);
|
||||
if (preg_match ('#<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></meta></head><body>(.*)</body></html>#ms', $output, $matches)) {
|
||||
$output = $matches [1]; // Remove <html><body>
|
||||
}
|
||||
|
||||
$doc->loadHTML('<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>' .
|
||||
$html . '</body></html>'); // Load the HTML
|
||||
$output = $doc->saveXML($doc->documentElement); // Transform to an Ansi xml stream
|
||||
$output = xml2xhtml($output);
|
||||
if (preg_match ('#<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></meta></head><body>(.*)</body></html>#ms', $output, $matches)) {
|
||||
$output = $matches [1]; // Remove <html><body>
|
||||
}
|
||||
/*
|
||||
// In case of error with summary, use it to debug
|
||||
$errors = libxml_get_errors();
|
||||
|
|
載入中…
新增表格
Add a link
新增問題並參考