150
rated 0 times
[
156]
[
6]
/ answers: 1 / hits: 20163
/ 10 Years ago, sat, august 2, 2014, 12:00:00
I use bootstrap and create html nodes which contain popovers with jQuery. The popovers contain html so that I have problems with the quotes and escaping:
var content = '<input type=text ng-model=test1 />';
var txt = '<button type=button data-container=body ' +
'data-toggle=popover title=myTitle data-html=true '+
'data-content='+content+'>Click</button>';
How can I escape the double quotes inside the attributes => html-attributes? in the data-content attribute correctly?
Edit: I compile the code with angular so that it should also work with it.
More From » angularjs