Fixed errors on snippet creation

* htmlspecialchars causing errors on line 364
no allowance for null $meta