0

Hotmail 的天才们决定为 lulz 的 HTML 电子邮件中的属性混合单'引号和双引号。"这不必要地使事情变得过于复杂,因为我试图在某些情况下获取 body 元素的类和 id 以将其从 CSS 选择器中删除。在这里进行基本的字符串替换显然不是一种选择。

4

1 回答 1

0

我意识到 PHP 的 DOMDocument 类会自动执行此操作...

 libxml_use_internal_errors(true); //use this to prevent warning messages from displaying because of the bad HTML
 $html = new DOMDocument();//'1.0','UTF-8'
 $html->xmlStandalone = false;
 $html->loadHTML($b);
 $b = $html->saveXML();
于 2013-07-23T19:32:59.413 回答