See test case at <http://greenbytes.de/tech/tc2231/#attwithfilenameandextparamescaped>. The extension parameter should be skipped, and the filename "foo.html" should be extracted. (the actual Safari/Win version was 5.03; dunno what Webkit version this translates to)
This code is not in open source WebKit, please report the problem via <http://bugreport.apple.com>. Thank you!