Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to force write method in _setElValue() #176

Open
gaydenko opened this issue Dec 1, 2013 · 1 comment
Open

add ability to force write method in _setElValue() #176

gaydenko opened this issue Dec 1, 2013 · 1 comment

Comments

@gaydenko
Copy link

gaydenko commented Dec 1, 2013

I mean that model-to-view cases when applying converter to model attribute results in html fragment, and we want to insert this fragment as new nodes into the DOM. If I understand correctly, at the moment just .text() is used for, say, div enclosing elements:

_setElValue:function (el, convertedValue) {
            ...
            else { // <----------------------- ANY not form element
                el.text(convertedValue || (convertedValue === 0 ? '0' : ''));
            }
}
@Fyrilin
Copy link

Fyrilin commented Aug 26, 2014

I also have a need for this. I prefer to use the general form of binding (IE. without converter and unspecified bindings) but would like my application to allow users to enter HTML and have it added as elements inside my bound div.

For now, I converted that line to el.html(... and it works fine. However, this opens up the possibility of XSS so use carefully!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants