Added proper escaping when passing strings into xpaths