Make links in html clickable

This commit is contained in:
Tankred Hase 2014-05-13 16:55:47 +02:00
parent e6de5366c9
commit b02df18347
1 changed files with 3 additions and 1 deletions

View File

@ -344,7 +344,9 @@ define(function(require) {
// wrap in html doc with scrollable html tag, since chrome apps does not scroll by default
var prefix = '<!DOCTYPE html><html style="overflow-y: auto"><head></head><body>';
var suffix = '</body></html>';
scope.html = $sce.trustAsHtml(prefix + value + suffix);
// open links in new window, otherwise the sandbox with not open them
var clickableHtml = value.replace(/<a /g, '<a target="_blank" ');
scope.html = $sce.trustAsHtml(prefix + clickableHtml + suffix);
});
}
});