Fixes for PHP 5.4, where appearantly mysql_escape_string has been fully deprecated already.
Merge branch 'hotfix/5.5.1' into develop