diff options
author | Christian Schmidt <github@chsc.dk> | 2018-07-25 22:47:29 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-07-25 22:47:29 +0300 |
commit | e09383ebeedd6b6f8dee8b57373027b00e6203b5 (patch) | |
tree | 3d0faed73ba8629a52a000147b99396239cdd0ba /plugins/Referrers | |
parent | ef9c48cc48587776107b1500dc14eef3ffa19154 (diff) |
Replace proxy redirect with rel=noreferrer (#12780)
* Replace proxy redirect with rel=noreferrer
* Add noopener
* Restore action=redirect for non-Matomo links
* Wrap referring URLs
* NO target on download link
* Fix Github links
* Fix whitespace
* Fix tests
* Revert change
* Revert changes
* Fix tests
* Add noreferrer shim for MSIE 10
* Remove all action=redirect links
* Restore noreferrer
* Restore test
* Fix one more occurrence
* Update changelog
* Combine if's
* Fix changelog wording
* Fix stray whitespace
Diffstat (limited to 'plugins/Referrers')
-rw-r--r-- | plugins/Referrers/Controller.php | 4 | ||||
-rw-r--r-- | plugins/Referrers/Reports/GetCampaigns.php | 2 | ||||
-rw-r--r-- | plugins/Referrers/Reports/GetKeywordsFromCampaignId.php | 2 | ||||
-rw-r--r-- | plugins/Referrers/templates/_visitorDetails.twig | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Referrers/Controller.php b/plugins/Referrers/Controller.php index 5a2ccd6459..367be3c9c9 100644 --- a/plugins/Referrers/Controller.php +++ b/plugins/Referrers/Controller.php @@ -428,8 +428,8 @@ function DisplayTopKeywords($url = "") echo "<p style='padding: 0 12px;'>This widget is designed to work in your website directly. This widget makes it easy to use Piwik to <i>automatically display the list of Top Keywords</i>, for each of your website Page URLs.</p> <p style='padding: 0 12px;'> - <b>Example API URL</b> - For example if you would like to get the top 10 keywords, used last week, to land on the page <a rel='noreferrer' target='_blank' href='$topPageUrl'>$topPageUrl</a>, - in format JSON: you would dynamically fetch the data using <a rel='noreferrer' target='_blank' href='$jsonRequest&url=" . urlencode($topPageUrl) . "'>this API request URL</a>. Make sure you encode the 'url' parameter in the URL.</p> + <b>Example API URL</b> - For example if you would like to get the top 10 keywords, used last week, to land on the page <a rel='noreferrer noopener' target='_blank' href='$topPageUrl'>$topPageUrl</a>, + in format JSON: you would dynamically fetch the data using <a rel='noreferrer noopener' target='_blank' href='$jsonRequest&url=" . urlencode($topPageUrl) . "'>this API request URL</a>. Make sure you encode the 'url' parameter in the URL.</p> <p style='padding: 0 12px;'><b>PHP Function ready to use!</b> - If you use PHP on your website, we have prepared a small code snippet that you can copy paste in your Website PHP files. You can then simply call the function <code>DisplayTopKeywords();</code> anywhere in your template, at the bottom of the content or in your blog sidebar. If you run this code in your page $topPageUrl, it would output the following:"; diff --git a/plugins/Referrers/Reports/GetCampaigns.php b/plugins/Referrers/Reports/GetCampaigns.php index da3e0edfdb..6984999f80 100644 --- a/plugins/Referrers/Reports/GetCampaigns.php +++ b/plugins/Referrers/Reports/GetCampaigns.php @@ -21,7 +21,7 @@ class GetCampaigns extends Base $this->dimension = new Campaign(); $this->name = Piwik::translate('Referrers_Campaigns'); $this->documentation = Piwik::translate('Referrers_CampaignsReportDocumentation', - array('<br />', '<a href="https://matomo.org/docs/tracking-campaigns/" rel="noreferrer" target="_blank">', '</a>')); + array('<br />', '<a href="https://matomo.org/docs/tracking-campaigns/" rel="noreferrer noopener" target="_blank">', '</a>')); $this->actionToLoadSubTables = 'getKeywordsFromCampaignId'; $this->hasGoalMetrics = true; $this->order = 9; diff --git a/plugins/Referrers/Reports/GetKeywordsFromCampaignId.php b/plugins/Referrers/Reports/GetKeywordsFromCampaignId.php index 7885bd0940..4ad420711e 100644 --- a/plugins/Referrers/Reports/GetKeywordsFromCampaignId.php +++ b/plugins/Referrers/Reports/GetKeywordsFromCampaignId.php @@ -20,7 +20,7 @@ class GetKeywordsFromCampaignId extends Base $this->dimension = new Keyword(); $this->name = Piwik::translate('Referrers_Campaigns'); $this->documentation = Piwik::translate('Referrers_CampaignsReportDocumentation', - array('<br />', '<a href="https://matomo.org/docs/tracking-campaigns/" rel="noreferrer" target="_blank">', '</a>')); + array('<br />', '<a href="https://matomo.org/docs/tracking-campaigns/" rel="noreferrer noopener" target="_blank">', '</a>')); $this->isSubtableReport = true; $this->order = 10; } diff --git a/plugins/Referrers/templates/_visitorDetails.twig b/plugins/Referrers/templates/_visitorDetails.twig index 107a0980e8..39c43d816e 100644 --- a/plugins/Referrers/templates/_visitorDetails.twig +++ b/plugins/Referrers/templates/_visitorDetails.twig @@ -1,7 +1,7 @@ <div class="visitorReferrer {{ visitInfo.getColumn('referrerType') }}"> {% if visitInfo.getColumn('referrerType') == 'website' %} <span>{{ 'Referrers_ColumnWebsite'|translate }}:</span> - <a href="{{ visitInfo.getColumn('referrerUrl') }}" rel="noreferrer" target="_blank" class="visitorLogTooltip" title="{{ visitInfo.getColumn('referrerUrl') }}" + <a href="{{ visitInfo.getColumn('referrerUrl') }}" rel="noreferrer noopener" target="_blank" class="visitorLogTooltip" title="{{ visitInfo.getColumn('referrerUrl') }}" style="text-decoration:underline;"> {{ visitInfo.getColumn('referrerName') }} </a> @@ -29,7 +29,7 @@ {% endif %} <span>{{ visitInfo.getColumn('referrerName') }}</span> {%- if showKeyword %}<span>, {{ 'Referrers_Keywords'|translate }}:</span> - <a href="{{ visitInfo.getColumn('referrerUrl') }}" rel="noreferrer" target="_blank" style="text-decoration:underline;"> + <a href="{{ visitInfo.getColumn('referrerUrl') }}" rel="noreferrer noopener" target="_blank" style="text-decoration:underline;"> "{{ visitInfo.getColumn('referrerKeyword') }}"</a> {% endif %} {% set keyword %}{{ visitInfo.getColumn('referrerKeyword') }}{% endset %} |