Aravind Aravind - 7 months ago 29
HTML Question

Bootstrap popover hides line breaks

I am using the html code as follows to show the bootstrap popover

<a data-original-title="" data-content="Hi,
Welcome !

Sincerely,
programmer
"
data-placement="bottom">
content
</a>


And I initialized the popover as follows

$(this).popover({
html:true
});


All works fine but the problem is the content available in data-content not displayed with the spaces....It removes all the new lines and show it in the single line ....How can i overcome this....

Answer

You need to use <br /> for new line in html or use a <pre> tag