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
Post a Comment