The escape() method replaces obviously bad characters such as '<' with '%3E' etc, but does not escape the '%' character itself for some reason. This means that clauses such as
MoleculeInchikey LIKE "XLYOFNOQVPJJNP%"
get escaped to
MoleculeInchikey%20LIKE%20%22XLYOFNOQVPJJNP%%22
which doesn't validate ("... not a valid value for 'anyURI'").
Do we need to escape the % character manually?
(submitted by C.Hill)