Here is my code:
\'); $pro
This correctly encodes the & < > and "" ''
& < >
"" ''
$parent->addChild($name, htmlspecialchars($value));