Skip to content

Commit

Permalink
More precise regex match
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid committed Mar 3, 2019
1 parent 374d70b commit fd1e947
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles
if (isDownloadableLink) {
downloadAttrValue = this.getAttribute('download');
// Normalize the value to a true Boolean or a filename string
downloadAttrValue = /download|true/i.test(downloadAttrValue) || downloadAttrValue || true;
downloadAttrValue = /^(download|true|\s*)$/i.test(downloadAttrValue) || downloadAttrValue || true;
contentType = this.getAttribute('type');
}
// Add an onclick event to extract this article or file from the ZIM
Expand Down

0 comments on commit fd1e947

Please sign in to comment.