From a8d5a68eb5d3565cc3505699e9ef577f480e17d3 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 20 Nov 2017 14:06:19 +0100 Subject: [PATCH] open links correctly in contacts app --- www/contacts/messenger-ui.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/contacts/messenger-ui.js b/www/contacts/messenger-ui.js index 3f8c8d09c..0e698d8ce 100644 --- a/www/contacts/messenger-ui.js +++ b/www/contacts/messenger-ui.js @@ -21,6 +21,14 @@ define([ // remove potentially malicious elements $d.find('script, iframe, object, applet, video, audio').remove(); + // override link clicking, because we're in an iframe + $d.find('a').each(function () { + var href = $(this).click(function (e) { + e.preventDefault(); + window.open(href); + }).attr('href'); + }); + // activate media-tags $d.find('media-tag').each(function (i, e) { MediaTag(e); }); } catch (e) {