Dynamically changing the HTML of a div with jQuery is causing HTML encoding to be lost

后端 未结 4 1769
栀梦
栀梦 2021-01-28 14:20

I have a piece of code which dynamically alters the HTML of a div called \'accordion\' on the fly like so:

// htmlstring contains some HTML containing some HTML          


        
4条回答
  •  执笔经年
    2021-01-28 14:55

    Thanks go to Barmar for providing the first correct answer. In actual fact I refactored my code so that I wasn't passing complicated strings via a method parameter, but my you did answer my initial query correctly.

    Thanks to other comments for your input too.

提交回复
热议问题