File tree Expand file tree Collapse file tree
website/modules/case-studies-page/views Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,18 +168,23 @@ <h2 class="portfolio-title">{{ data.piece.portfolioTitle }}</h2>
168168 < div class ="links-area ">
169169 {% if data.piece.fullStoryUrl %}
170170 < a
171- href ="{{ data.piece.fullStoryUrl }} "
172- target ="_blank "
173- rel ="noopener noreferrer "
174- class ="full-story_btn "
175- > Read The Full Story</ a
171+ href ="{{ data.piece.fullStoryUrl }} "
172+ target ="_blank "
173+ rel ="noopener noreferrer "
174+ class ="full-story_btn "
175+ > Read The Full Story</ a
176176 >
177177 {% endif %} {% if data.piece.prodLink %}
178+ {# Remove path/query/fragment #}
179+ {% set urlWithoutProtocol = data.piece.prodLink | replace('https://', '') | replace('http://', '') %}
180+ {% set domainWithOrWithoutWww = urlWithoutProtocol.split('/')[0] %}
181+ {% set cleanDomain = domainWithOrWithoutWww | trim | replace('www.', '') %}
178182 < a
179183 href ="{{ data.piece.prodLink }} "
180184 target ="_blank "
181185 class ="prod-link "
182- > {{ data.piece.prodLink }}</ a
186+ rel ="noopener noreferrer "
187+ > {{ cleanDomain }}</ a
183188 >
184189 {% endif %}
185190 </ div >
You can’t perform that action at this time.
0 commit comments