Skip to content
18 changes: 15 additions & 3 deletions website/modules/testimonials-carousel-widget/views/widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,22 @@ <h5 class="sf-person__position sf-person__organization">
{{ card.organization }}
</h5>
</div>
{% endif %} {% if card.url %}
<a href="{{ card.url }}" target="_blank" class="sf-person__url"
>{{ card.url }}</a
{% endif %} {% if card.url %} {# Remove protocol #} {% set
urlWithoutProtocol = card.url %} {% if card.url.split('://') |
length > 1 %} {% set urlWithoutProtocol =
card.url.split('://')[1] %} {% endif %} {# Remove
path/query/fragment #} {% set domainWithOrWithoutWww =
urlWithoutProtocol.split('/')[0] %} {# Remove www. if present #}
{% set cleanDomain = domainWithOrWithoutWww | trim |
replace('www.', '') %}
<a
href="{{ card.url }}"
target="_blank"
class="sf-person__url"
rel="noopener noreferrer"
>
{{ cleanDomain }}
</a>
{% endif %}
</div>
</div>
Expand Down
Loading