Escape "'" in ScriptResolver.resolve(Query query)