Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70904

Getting unsafe url error (see http://g.co/ng/security#xss)

$
0
0

@keloa wrote:

Hey
I'm trying to open a whats'app link and I'm getting thus error :

WARNING: sanitizing unsafe URL value SafeValue must use
(see http://g.co/ng/security#xss)

here is my code :

<a href="{{surl}}">
<img src="assets/imgs/whatsapp.png" height=35px/></a>

and in the ts file here is what surl holds :

this.url = 'whatsapp://send?text=Hello World!&phone=+966'+this.phone
this.surl = this.dom.bypassSecurityTrustUrl(this.url);

the problem as you can tell is that I'm passing a variable to the url , but cordova won't trust it !
any ideas how can I solve this problem ?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70904

Trending Articles