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) {
|
function html2xhtml ($html) {
|
||||||
$doc = new DOMDocument();
|
$doc = new DOMDocument();
|
||||||
libxml_use_internal_errors(true);
|
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
|
$doc->loadHTML('<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>' .
|
||||||
$output = $doc->saveXML($doc->documentElement); // Transform to an Ansi xml stream
|
$html . '</body></html>'); // Load the HTML
|
||||||
$output = xml2xhtml($output);
|
$output = $doc->saveXML($doc->documentElement); // Transform to an Ansi xml stream
|
||||||
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 = xml2xhtml($output);
|
||||||
$output = $matches [1]; // Remove <html><body>
|
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
|
// In case of error with summary, use it to debug
|
||||||
$errors = libxml_get_errors();
|
$errors = libxml_get_errors();
|
||||||
|
|
|
||||||
正在加载…
添加表格
添加链接
在新工单中引用