Bugfixes inside functions.php to get rid of the deprecated mysql_real_escape_string mesh.