Here is my code:
\'); $pro
My solution to this is specifically creating a text node, which makes sure absolutely everything is escaped properly:
$cell = $dom->createElement('td'); $cell->appendChild($dom->createTextNode($value));