The substring-after function returns a substring begining at <length of search string>, instead of <length of search string> + <found index>. alert(document.evaluate("substring-after('abcde', 'd')", document, null, XPathResult.STRING_TYPE, null).stringValue); "e" in Gecko and Opera, "bcde" in WebKit. This is revealed in amachang's XPath test (see the URL field).
Created attachment 16595 [details] proposed fix
Comment on attachment 16595 [details] proposed fix r=me
Committed revision 26173 (feature branch).