html - PHP Replace attribute single quotes with double quotes -


the geniuses @ hotmail decided mix single ' , double quotes " attributes in html emails lulz. unnecessarily over-complicates things i'm trying class , id body element in cases remove css selectors. doing basic string replacement not option here.

i realized php's domdocument class automatically...

 libxml_use_internal_errors(true); //use prevent warning messages displaying because of bad html  $html = new domdocument();//'1.0','utf-8'  $html->xmlstandalone = false;  $html->loadhtml($b);  $b = $html->savexml(); 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -