Embedding JSON objects in script tags

前端 未结 4 1467
情深已故
情深已故 2020-12-06 09:33

EDIT: For future reference, I\'m using non-xhtml content type definition

I\'m creating a website using Django, and I\'m trying to embed ar

4条回答
  •  一向
    一向 (楼主)
    2020-12-06 10:09

    I tried backslash escaping the forward slash and that seems to work:

    
    

    have you tried that?


    On a side note, I am surprised that the embedded tag in a string breaks the javascript. Couldn't believe it at first but tested in Chrome and Firefox.

提交回复
热议问题