vendredi 25 novembre 2016

Handlebars : triple mustaches print all html if any html tag is incomplete

I want to remove HTML tags from the text in handlebars. So I am using triple braces '}', which is working fine.

But the problem is that I am doing the substring of text when its length is more than 90. And after doing that HTML tags in text get incomplete. For example:-

Original text was :-

We will soon start with Mocha , Chai and Karma <a href='http://ift.tt/2fysIqM' target='_blank'>@Shivam</a> <a href='http://ift.tt/2gc77Tq' target='_blank'>@Punit</a> <a href='http://ift.tt/2fyAQrd' target='_blank'>@Nitin</a> <a href='http://ift.tt/2gccYIl' target='_blank'>@Ishimdar</a> 

After substring it got:-

We will soon start with Mocha , Chai and Karma <a href='http://ift.tt/2fyz9KE

Now when I put this new text in triple braces then handlebars not behaving this like HTML and print all HTML code of my HTML file, which is after that text.

Any help appreciated Regards Shivam




Aucun commentaire:

Enregistrer un commentaire