mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
Fix UTF8 characters encoding on file rename and display #99
This commit is contained in:
parent
1ae2afb998
commit
1871981fea
@ -85,7 +85,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
base64: function (name) {
|
||||
return window.btoa(name)
|
||||
return window.btoa(unescape(encodeURIComponent(name)))
|
||||
},
|
||||
dragEnter: function (event) {
|
||||
let items = document.getElementsByClassName('item')
|
||||
|
@ -6,8 +6,7 @@
|
||||
@drop="drop"
|
||||
@click="click"
|
||||
@dblclick="open"
|
||||
:aria-selected="isSelected()"
|
||||
:id="base64()">
|
||||
:aria-selected="isSelected()">
|
||||
<div>
|
||||
<i class="material-icons">{{ icon() }}</i>
|
||||
</div>
|
||||
@ -57,9 +56,6 @@ export default {
|
||||
humanTime: function () {
|
||||
return moment(this.modified).fromNow()
|
||||
},
|
||||
base64: function () {
|
||||
return window.btoa(this.name)
|
||||
},
|
||||
dragStart: function (event) {
|
||||
if (this.selectedCount === 0) {
|
||||
this.addSelected(this.index)
|
||||
|
@ -49,6 +49,7 @@ export default {
|
||||
oldLink = this.req.data.items[this.selected[0]].url
|
||||
}
|
||||
|
||||
this.name = encodeURIComponent(this.name)
|
||||
newLink = page.removeLastDir(oldLink) + '/' + this.name
|
||||
|
||||
// buttons.setLoading('rename')
|
||||
|
Loading…
Reference in New Issue
Block a user