summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Dachary <loic@dachary.org>2011-10-08 11:27:35 +0200
committerLoic Dachary <loic@dachary.org>2011-10-08 11:27:35 +0200
commit38fe6a669b4fa44eb791aae87cc7776aa4b44e73 (patch)
tree548b5dc87071c0e5330004986f6dadc951aa0d22
parent2d66c0d00b18e93dcf7bf80bdb4e581bd654de37 (diff)
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018981.html
in a nutshell : deal with it, it won't go away The original plan was to just have the filename. Unfortunately, it turns out that if you do that, there are certain sites that break, because they expect the path (and they expect a Windows path, no less). This is why Opera and IE8 return a fake path -- not because HTML5 says to do it. In fact I made HTML5 say it because they were doing it.
-rw-r--r--bug/bug/bug.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 955d408..964af78 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -186,7 +186,10 @@
});
}
$("input[type='file']", element).change(function() {
- $("input[name='ignored']", element).val($(this).val());
+ // http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018981.html
+ // in a nutshell : deal with it, it won't go away
+ var path = $(this).val().replace("C:\\fakepath\\","")
+ $("input[name='ignored']", element).val(path);
});
$.bug.current_step('attach');
element.show();