Commit e2b73513f4b323d96f4b9fa0cf4a06a057666750

Authored by panxiaoming
1 parent 7acd0604

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.
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/assets/javascripts/tree.js.coffee
... ... @@ -28,7 +28,7 @@ $ ->
28 28 return false
29 29  
30 30 $('#tree-slider .tree-item-file-name a, .breadcrumb li > a').live 'click', (e) ->
31   - History.pushState(null, null, $(@).attr('href'))
  31 + History.pushState(null, null, decodeURIComponent($(@).attr('href')))
32 32 return false
33 33  
34 34 History.Adapter.bind window, 'statechange', ->
... ...