diff options
author | panxiaoming <panxiaoming2008@gmail.com> | 2012-11-28 10:09:55 +0800 |
---|---|---|
committer | panxiaoming <panxiaoming2008@gmail.com> | 2012-11-28 10:09:55 +0800 |
commit | e2b73513f4b323d96f4b9fa0cf4a06a057666750 (patch) | |
tree | 26fbc04bedc00404df2558004f22ecd5cb2beedb | |
parent | 7acd0604007da3ac8c56bbe3a07d8ee1692e6908 (diff) | |
download | gitlab-ce-e2b73513f4b323d96f4b9fa0cf4a06a057666750.tar.gz |
fixed the bug of URIDECODE error
if link to a chinese file name, it will jump to error page;
for example, the chinese file name called "消息文档.md", when after urlencode, it will be "%E6%B6%88%E6%81%AF%E6%96%87%E6%A1%A3.md", but after use History.pushState, will jump to a bad decode link.
-rw-r--r-- | app/assets/javascripts/tree.js.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/tree.js.coffee b/app/assets/javascripts/tree.js.coffee index 3f8ed6c2552..5003f9b00c7 100644 --- a/app/assets/javascripts/tree.js.coffee +++ b/app/assets/javascripts/tree.js.coffee @@ -28,7 +28,7 @@ $ -> return false $('#tree-slider .tree-item-file-name a, .breadcrumb li > a').live 'click', (e) -> - History.pushState(null, null, $(@).attr('href')) + History.pushState(null, null, decodeURIComponent($(@).attr('href'))) return false History.Adapter.bind window, 'statechange', -> |