What is the best way to escape HTML on ExtJS application generally?

前端 未结 3 1514
执念已碎
执念已碎 2021-02-13 22:33

I am developing a web application using ExtJS to build GUI and communicate with server via RESTful web-service (the returned data is formatted as JSON objects).
Now I am hav

3条回答
  •  离开以前
    2021-02-13 22:53

    If you're using Ext.XTemplate, you can escape html in fields like this:

    var tpl = new Ext.XTemplate(
        '

    My Field: {myField:htmlEncode}

    ' );

提交回复
热议问题