fix: multy space or & in file name
parent
1d7d667220
commit
e40223eb72
|
@ -588,7 +588,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addVideos(['<!--FileDownUrl-->']);
|
addVideos(['<!--FileEncodeUrl-->']);
|
||||||
<!--IsvideoFileEnd-->
|
<!--IsvideoFileEnd-->
|
||||||
<!--IspdfFileStart-->
|
<!--IspdfFileStart-->
|
||||||
pdfjsLib.GlobalWorkerOptions.workerSrc = '//cdn.bootcss.com/pdf.js/2.3.200/pdf.worker.min.js';
|
pdfjsLib.GlobalWorkerOptions.workerSrc = '//cdn.bootcss.com/pdf.js/2.3.200/pdf.worker.min.js';
|
||||||
|
@ -1075,16 +1075,10 @@
|
||||||
if (num=='') {
|
if (num=='') {
|
||||||
var str='';
|
var str='';
|
||||||
} else {
|
} else {
|
||||||
var str=document.getElementById('file_a'+num).innerText;
|
var str=decodeURIComponent(document.getElementById('file_a'+num).href);
|
||||||
if (str=='') {
|
if (str.substr(-1)==' ') str=str.substr(0, str.length-1);
|
||||||
str=document.getElementById('file_a'+num).getElementsByTagName("img")[0].alt;
|
if (str.substr(-8)=='?preview') str=str.substr(0, str.length-8);
|
||||||
if (str=='') {
|
if (str.lastIndexOf('/')>-1) str=str.substr(str.lastIndexOf('/')+1);
|
||||||
alert('<!--constStr@GetFileNameFail-->');
|
|
||||||
operatediv_close(action);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (str.substr(-1)==' ') str=str.substr(0,str.length-1);
|
|
||||||
}
|
}
|
||||||
document.getElementById(action + '_div').style.display='';
|
document.getElementById(action + '_div').style.display='';
|
||||||
document.getElementById(action + '_label').innerText=str;//.replace(/&/,'&');
|
document.getElementById(action + '_label').innerText=str;//.replace(/&/,'&');
|
||||||
|
|
Loading…
Reference in New Issue