Blog Excerpt ignoring HTML formatting

Solved
New Member
6 0 0

Hi


I have a blog article and have used HTML <sup> tag to display the "TM" symbol as a superscript.  When displayed on my website, it is ignoring the HTML styling.

 

I am using Flow template.

 

https://repairbynature.co.za/blogs/newsExcerpt2.PNGExcerpt1.PNG

 

Kind regards,
Andrea

 

 

0 Likes

Hello @StormDigital,

If you want HTML <sup> tag then follow below steps

2019-12-19_15-38.jpg

 

2019-12-19_15-38(2).jpg

 

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Free Review and advice for sale on store | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | SEO & Digital Marketing | Site Speed Optimization | Performance Site Audit
0 Likes
New Member
6 0 0

Hi


My HTML includes the <sup> tag.  If you look at the 2 images, the Excerpt rich text panel shows it correctly in Shopify, but when the blog is displaying on the site, it is not displaying correctly.

0 Likes

@StormDigital,

Can you please show me the blog post in  html format

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Free Review and advice for sale on store | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | SEO & Digital Marketing | Site Speed Optimization | Performance Site Audit
0 Likes
New Member
6 0 0

I don't know if I understand what you are requiring.  Below is the Excerpt in HTML Format.  It is only the Excerpt that is a problem, the blog article is displaying correctly when you navigate to the blog article.   You can take a look at the page here:  https://repairbynature.co.za/blogs/news  - you will see that the Excerpt is showing it as "CycloferinTM"  even though the HTML is putting the TM between <sup> tags.

<p><span>Why do we age, and how does Cycloferin<sup>TM</sup> help?</span></p>
<p><span>Cycloferin<sup>TM</sup> encourages the body to repair itself as opposed to trying to replace collagen after it is broken down.  The majority of collagen supplements contain synthesized collagen from animals, that our bodies struggle to absorb.  At Repair by Nature, our focus to anti-aging is stopping the initial collagen damage.</span></p>

 

Please let me know if you require anything else.


Thanks

 

 

0 Likes

Success.

Astronaut
1069 145 260

Since I think it's pretty common that this might be the case, check your blog.liquid and look for the article.excerpt. It may have a string filter applied to it to strip the html:

 

{% for article in blog.articles %}
  {{ article.excerpt |  strip_html }}
{% endfor %}

If that's the case, just remove the filter:

 

{% for article in blog.articles %}
  {{ article.excerpt }}
{% endfor %}
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
New Member
6 0 0

Thank  you for your solution.


It worked perfectly!

0 Likes