mardi 30 janvier 2018

HTML Safe for more than one handlebar

I am doing string parsing inside ember template. so, my code look like this

for {
 
 
}

So, basically if below is the string This is John I wanted John to be highlighted & mouse over John will take you to some other link.

Here, problem I face is.. 1) As i am breaking the string into 2, strings that starts with div tag are getting broken. Html escape autocloses the div tag. which then result in display output like this

This is
John (highlighted)

Instead of "This is John" Is there any way to stop auto closing?

2) Is there any way to do combined html escape for both helper & component inside templates?

3) Is there any way to bring in helper-component as a string from JS helper , so that we can execute it inside template ?




Aucun commentaire:

Enregistrer un commentaire