Bug 15437

Summary: XPath substring-after function is broken
Product: WebKit Reporter: nanto_vi (TOYAMA Nao) <nanto>
Component: XMLAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
URL: http://amachang.art-code.org/xpath_functional_test/
Bug Depends on:    
Bug Blocks: 15448    
Attachments:
Description Flags
proposed fix mitz: review+

nanto_vi (TOYAMA Nao)
Reported 2007-10-09 07:50:10 PDT
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).
Attachments
proposed fix (7.38 KB, patch)
2007-10-09 09:31 PDT, Alexey Proskuryakov
mitz: review+
Alexey Proskuryakov
Comment 1 2007-10-09 09:31:34 PDT
Created attachment 16595 [details] proposed fix
mitz
Comment 2 2007-10-09 09:39:03 PDT
Comment on attachment 16595 [details] proposed fix r=me
Alexey Proskuryakov
Comment 3 2007-10-09 12:09:37 PDT
Committed revision 26173 (feature branch).
Note You need to log in before you can comment on or make changes to this bug.