Bootstrap popover hides line breaks

后端 未结 6 1013
野趣味
野趣味 2020-12-24 10:44

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



        
6条回答
  •  不思量自难忘°
    2020-12-24 11:10

    To add on to Arun P Johny's solution, if you find that your
    tags in the data-content value are rendering as plain text in the popover content on the page, add the additional attribute data-html="true", like so:

    
        content
    
    

    Be aware that using data-html="true" does introduce a potential vulnerability to XSS attacks; don't use it with unsanitized user input.

    Docs: https://getbootstrap.com/docs/3.3/javascript/#popovers-options

提交回复
热议问题