toStaticHTML function doesn't work well RRS feed

  • Question

  • I met the problem like this post talked about


    I get some untrusted html content from web, and put the content in my app, use innerHTML

    then I found some content can't display as expected, and the error which marked in the post above occur.

    so I use th function toStaticHTML to filter the content

    but it seems not work well, there are still some content can't not dispaly well, and the error occur the same.

    here is my code:

    var list = new WinJS.Binding.List();
    // many items contain untrusted content
    items.forEach(function (item) {
        // filter the content
        item.htmlContent = toStaticHTML(item.content);
    <article class="article-content" data-win-bind="innerHTML: htmlContent"></article>

    please help! thx!
    Tuesday, April 10, 2012 11:36 AM

All replies