Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use data-saferedirecturl in a tag in PHP?

I want any other server request goes through my server just like link in Gmail and i checked it there data-saferedirecturl="".

So how to use data-saferedirecturl in PHP automatcally in our website?

Exapmple:

<a href="xxxxx" target="_blank" data-saferedirecturl="https://www.mywebsite.com/url?hl=en&amp;q=xxxx">Link</a>
like image 800
Arshad Shaikh Avatar asked Aug 07 '18 07:08

Arshad Shaikh


1 Answers

All links in Gmail are interpreted in the browser.

The data-saferedirecturl tag is added automatically.

So the href shows the link that you will be clicking in the bottom of your browser but sends you to a google-originated URL like https://www.google.com/url?hl=en-GB&site.com/324dd3.

This way the third party don't have access to sensitive data.

like image 89
O.Rares Avatar answered Oct 14 '22 10:10

O.Rares