Update to `escape` method

`$var` parameter is now referenced.