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
DataGrid: Failed to set the 'innerHTML' property on 'Element' #8709
Comments
@adamzhang1932 So this only happens in your app not in the examples? I think maybe we need to see why wrapper is empty? The latest code has a check here..
So does the diff 4.91.0...4.91.1#diff-13c32b0c73b40992aa6d376fb22d6746845a3b7d6d2545e19bd30687bcabb5a5R11481 Can you test against the latest version? Even if you cant upgrade this would help us know. I personally dont like the |
1.The error happened in my app. |
This issue can be reproduced starting from 4.91.1+. The change is #8447. |
ok @adamzhang1932 @InforBG I tried the suggestion please review #8718 |
@tmcconechy Thanks a lot. |
Describe the bug
When I call the 'updateRow' method in datagrid.js, an error occured:
To Reproduce
Sorry for that it is not easy to reproduce, the error just occurred after we upgrading IDS from v4.91.0 to v4.91.1.
And in v4.91.0, our codes worked well.
Expected behavior
A clear and concise description of what you expected to happen.
Version
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
Additional context
1.In firefox, it works well, the error occurred when I use the chrome browser.
2.For the codes in
updateCellNode
method indatagrid.js
file:wrapper[0].innerHTML = formatted;
,I am wondering if the above codes in IDS can be changed through some solutions:
Solution 1:
Define a new method which can avoid the xss attack, for example
escapeHtml
and then:wrapper.html(escapeHtml(formatted));
Solution 2:
// If using innerHTML throws an exception, then use the fallback method.
The text was updated successfully, but these errors were encountered: