CMS Development

designfrance
Participant | Diamond Partner
Participant | Diamond Partner

problem displaying special characters blog tag

Hello

I just created a blog and I have a problem with my tag! 

One is called "R&D"

In my navigation my tag displays well, and when I go to the listing page of this tag the "&" is no displayed... only "RD" 

would you know how i can have the display of the special character?

Here is my code :

 <div class="title__articles">
<div class="container">
<div class="row">
<div class="col-12 col-md-12">
<h1>{{ topic|replace('-',' ') }}</h1>
</div>
</div>
</div>
</div>

 And my blog : https://blog.armor-proteines.com/en

 

Thank you 🙂 

 

 

0 Upvotes
5 Replies 5
TTimes
Contributor

problem displaying special characters blog tag

Hi @designfrance 

Perhaps you could use the HTML encoding for ampersand in the topic name?

https://www.toptal.com/designers/htmlarrows/punctuation/ampersand/

Edit: or the escape filter:

TTimes_0-1661857777391.png

https://developers.hubspot.com/docs/cms/hubl/filters 

0 Upvotes
designfrance
Participant | Diamond Partner
Participant | Diamond Partner

problem displaying special characters blog tag

Thank you for your answer ! 

But this is not possible because in code this is dynamic...

0 Upvotes
TTimes
Contributor

problem displaying special characters blog tag

@designfrance 

Did you try the escape filter, as per my edit?

0 Upvotes
designfrance
Participant | Diamond Partner
Participant | Diamond Partner

problem displaying special characters blog tag

no, because that no posssible 😕 

0 Upvotes
TTimes
Contributor

problem displaying special characters blog tag

Ok, I might have misunderstood your question.

Is it the blog it self that's called R&D or is it a tag within a 'standard' blog?

If it's the latter, then i'm quite keen to understand why using the escape filter  in the loop that traverses the tag list and outputting them wouldn't be possible.

Would you care to share some code or elaborate further?

0 Upvotes