metal.js icon indicating copy to clipboard operation
metal.js copied to clipboard

Some use cases do not work well when HTML2IncDom is called

Open matuzalemsteles opened this issue 6 years ago • 1 comments

Disclaimer

When we have an application in soy that the value of our STATE is set to isHTML for true:

MyComponent.STATE = {
    text: {
        isHTML: true,
        value: '<p><strong><em><u><a href="http://t4gdgreg" target="">rtetettrttrrtert</a></u></em></strong></p>'
    }
}

It calls the function HTML2IncDom.buildFn(...) to do the parser, but we have some use cases like the one above that it returns the wrong parser, this is reflected in the DOM, it seems to be some problem with the tag a inside the parser, but not sure about that.

This is quite common to happen in editors like AlloyEditor, to stylize the text.

Current behavior

screen shot 2018-04-24 at 14 34 10

Expected behavior

screen shot 2018-04-24 at 14 50 14

matuzalemsteles avatar Apr 24 '18 17:04 matuzalemsteles

/cc @alinedoleron

brunobasto avatar Apr 24 '18 18:04 brunobasto