def quote(s): """Quotes a string in such a way that it is usable inside XPath expressions.""" return unescape(quoteattr(s))