projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
516048c
)
Removed doctype and fixed entities for text/plain
author
Alexander Ebert
<ebert@woltlab.com>
Mon, 1 Aug 2016 15:07:05 +0000
(17:07 +0200)
committer
Alexander Ebert
<ebert@woltlab.com>
Mon, 1 Aug 2016 15:07:05 +0000
(17:07 +0200)
Fixes #2069
wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php
patch
|
blob
|
blame
|
history
wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php
b/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php
index 57a7f1466da086b56f86c31d2299dd55e0424d51..94884bd4c9632af6fe83832662104f257bb8c54e 100644
(file)
--- a/
wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php
+++ b/
wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php
@@
-72,6
+72,7
@@
abstract class AbstractHtmlNodeProcessor implements IHtmlNodeProcessor {
$html = $this->document->saveHTML($this->document->getElementsByTagName('body')->item(0));
// remove nuisance added by PHP
+ $html = preg_replace('~^<!DOCTYPE[^>]+>\n~', '', $html);
$html = preg_replace('~^<body>~', '', $html);
$html = preg_replace('~</body>$~', '', $html);
diff --git
a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php
b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php
index 175ea2884f077fcb282a0dd36b1b282861849325..b34e21f657c811badecef0a256cc17df828c5acf 100644
(file)
--- a/
wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php
+++ b/
wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php
@@
-100,6
+100,7
@@
class HtmlOutputNodeProcessor extends AbstractHtmlNodeProcessor {
if ($this->outputType === 'text/plain') {
$html = StringUtil::trim($html);
+ $html = StringUtil::decodeHTML($html);
}
return $html;