Document justification for dangerouslySetInnerHTML, fixes #2256#2518
Conversation
|
Thoughts on also mentioning that the HTML must be formed correctly? At one point we had an issue with truncated HTML that was missing some closing div tags. We had to eventually create a document fragment and set the innerhtml so the browser would fix it then get the innerhtml again and pass it to dangerous set inner html. |
|
Cool, I added a sentence saying the HTML passed in should be well formed / pass validation (which implicitly requires tags be closed, since that's required for validation). |
84371f9 to
d3b4d5a
Compare
|
👍 @JSFB awesome that looks good to me |
d3b4d5a to
290b670
Compare
|
Modified to better explain the reasoning behind {__html} |
There was a problem hiding this comment.
innerHTML (and probably use ` to codeify it)
290b670 to
78dade6
Compare
|
@zpao Ping. Ready to merge? |
78dade6 to
dbdf7d4
Compare
|
@zpao Ping. Since we've been waiting on this one for months, merge conflicts have appeared, which have been resolved. Can we get this one merged? |
There was a problem hiding this comment.
Is this link broken now?
There was a problem hiding this comment.
Good catch, link changed in previous CR change, fixed.
|
lgtm otherwise |
Conflicts: docs/_data/nav_tips.yml docs/tips/17-children-undefined.md
dbdf7d4 to
6f44f60
Compare
…nerHtml Document justification for dangerouslySetInnerHTML, fixes #2256
I put this into the "tips" section. Perhaps this should be in the "reference" section - let me know if you have a preference.