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 <collin.doering@rekahsoft.ca>
This commit is contained in:
Collin J. Doering 2015-01-10 19:09:12 -05:00
parent 4c2f99c302
commit 9a9630435b
1 changed files with 3 additions and 1 deletions

View File

@ -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");