Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filename with # character #84

Open
huynhdnguyen opened this issue Dec 15, 2020 · 1 comment
Open

Filename with # character #84

huynhdnguyen opened this issue Dec 15, 2020 · 1 comment

Comments

@huynhdnguyen
Copy link

Hi
In history, hyperlink filename is not formatted ASCII when using a special character (#) so the image is not shown in a lightbox.
img
can you help me fix it?

@huynhdnguyen
Copy link
Author

huynhdnguyen commented Dec 15, 2020

// 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;
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant