function mysql_real_escape_string (str) { return str.replace(/[ x08x09x1a "'\%]/g, function (char) { switch (char) { case "