From 9a9630435bb9dab5606e1c4bf9194803df9b14be Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Sat, 10 Jan 2015 19:09:12 -0500 Subject: [PATCH] Fixed handling of internal image urls within page-content When an anchor within #page-content has a href matching /images\/.*/ it should be viewed as a resource for download/view instead of loaded into $page-content. Signed-off-by: Collin J. Doering --- js/default.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/default.js b/js/default.js index 67de5c2..d39c17a 100644 --- a/js/default.js +++ b/js/default.js @@ -63,10 +63,12 @@ var external_url_regexp = /https?:\/\/.*/; var mailto_regexp = /mailto:.*/; var files_regexp = /files\/.*/; + var images_regexp = /images\/.*/; if (external_url_regexp.test(page_href) || mailto_regexp.test(page_href) - || files_regexp.test(page_href)) { + || files_regexp.test(page_href) + || images_regexp.test(page_href)) { window.location.href = page_href; } else if ($(this).attr("rel")) { var virtual_href = $(this).attr('rel').replace(/address:(.*)/, "$1");