Avoid failure on PHP 5.3.3  by manually encoding the single quotes