projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d1961e0
)
Mailer.php
author
edward
<edward@roojs.com>
Mon, 26 Mar 2018 08:40:48 +0000
(16:40 +0800)
committer
edward
<edward@roojs.com>
Mon, 26 Mar 2018 08:40:48 +0000
(16:40 +0800)
Mailer.php
patch
|
blob
|
history
diff --git
a/Mailer.php
b/Mailer.php
index
9663ced
..
afb8731
100644
(file)
--- a/
Mailer.php
+++ b/
Mailer.php
@@
-459,13
+459,13
@@
class Pman_Core_Mailer {
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
+ $html = $dom->getElementsByTagName('html');
$head = $dom->getElementsByTagName('head');
$body = $dom->getElementsByTagName('body');
if(!$head->length){
$head = $dom->createElement('head');
$head = $dom->getElementsByTagName('head');
$body = $dom->getElementsByTagName('body');
if(!$head->length){
$head = $dom->createElement('head');
-
- $body->item(0)->parentNode->insertBefore($head, $body->item(0));
+ $html->item(0)->insertBefore($head, $body->item(0));
$head = $dom->getElementsByTagName('head');
}
$head = $dom->getElementsByTagName('head');
}