1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/plugins/Actions/templates/_profileSummary.twig
diosmosis 43b61590e5 Introduce whitelist test for link protocols. (#13798)
* Introduce whitelist test for link protocols.

* Two more url fixes.

* Add whole_url escape filter to do url trustworthiness check.

* Use whole_url in conjunction w/ html_attr, since twig will automatically apply html if not done.

* Use existing safelink filter.

* Regex tweak.
2018-12-10 11:29:46 -08:00

26 خطوط
1.2 KiB
Twig

{% if visitorData.totalPageViews > 0 %}
<div class="visitor-profile-summary visitor-profile-pages">
<h1>{{ 'Actions_RevisitedPages'|translate }}</h1>
<div>
<ul>
{% for url,count in visitorData.visitedPages %}
{% if loop.index < 6 and count > 1 %}
<li><span class="repeat icon-refresh" title="{{ 'Actions_PageViewsByVisitor'|translate }}">{{ count }}</span>
{% if url|trim|lower starts with 'javascript:' or
url|trim|lower starts with 'vbscript:' or
url|trim|lower starts with 'data:' %}
{{ url }}
{% else %}
<a href="{{ url|safelink|e('html_attr') }}" rel="noreferrer noopener" target="_blank"
class="action-list-url truncated-text-line">
{{ url|replace({'http://': '', 'https://': ''}) }}
</a>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
{% endif %}