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:
parent
4c2f99c302
commit
9a9630435b
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue