change target for links in posts

This commit is contained in:
Morgan McMillian 2018-11-12 13:37:09 -08:00
parent d80cdf1690
commit 7f04d55641

View file

@ -17,7 +17,7 @@ export class ParserPipe implements PipeTransform {
transform(value: string, ...args): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {
let hregex = /href="([\S]+)"/g;
// value = value.replace(hregex, "class=\"ex-link\" href=");
value = value.replace(hregex, "onClick=\"window.open('$1', '_system', 'location=yes')\"");
value = value.replace(hregex, "onClick=\"window.open('$1', '_blank', 'location=yes')\"");
return this._sanitizer.bypassSecurityTrustHtml(value);
}
}