Fix ' in filenames
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
ae32dd74c5
commit
3b8e149922
@ -84,7 +84,7 @@
|
||||
|
||||
thumbChanged: function(thumbpath, visible) {
|
||||
if (visible) {
|
||||
this.style.backgroundImage = "url(" + thumbpath + ")";
|
||||
this.style.backgroundImage = "url(" + encodeURI(thumbpath).replace(/'/g, "\\'") + ")";
|
||||
} else {
|
||||
this.style.backgroundImage = "";
|
||||
}
|
||||
@ -96,7 +96,10 @@
|
||||
},
|
||||
|
||||
safeItemThumbFilepath: function(item, base) {
|
||||
return "'" + (base + encodeURI(item.path) + "/thumbs/" + encodeURI(item.filename)).replace(/'/, "\\'") + "'";
|
||||
if (!item || !base || !item.path) {
|
||||
return "";
|
||||
}
|
||||
return base + item.path + "/thumbs/" + item.filename;
|
||||
},
|
||||
|
||||
date: function(item) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user