Filename with # character
huynhdnguyen opened this issue · 1 comments
huynhdnguyen commented
huynhdnguyen commented
// modify filename links in journal details -> add filename to url to support fancybox preview
$("div.journal ul.details li a:not([title])").attr('href', function(i, v){
if($(this).html().match(extensionRegexAll)) {
// return v.replace(//attachments/(\d+)/g,'/attachments/download/$1') + '/' + $(this).html();
return v.replace(//attachments/(\d+)/g,'/attachments/download/$1') + '/' + encodeURIComponent($(this).html().replace('&"amp";','&'));
} else {
return v;
}
});