You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is a validation check, where if you pass in a a string of HTML as "data", it must begin with a <. As all HTML documents should start with <!DOCTYPE html> or <html> or even just <div>.
Though technically, if we are allowing someone to pass this in:
<div>
Some text <spanclass="cow">Moo</span>.
</div>
and converting it to
<html><head></head><body><div>
Some text <spanclass="rp__0 rp__1">Moo</span>.
</div></body></html>
Why not just allow Some text <span class="rp__0 rp__1">Moo</span>. to be passed in? the outcome is the same without the div wrapper?
What would be a use case for this?
Perhaps just validating that it is a string is good enough?
The text was updated successfully, but these errors were encountered:
Currently there is a validation check, where if you pass in a a string of HTML as "data", it must begin with a
<
. As all HTML documents should start with<!DOCTYPE html>
or<html
> or even just<div>
.Though technically, if we are allowing someone to pass this in:
and converting it to
Why not just allow
Some text <span class="rp__0 rp__1">Moo</span>.
to be passed in? the outcome is the same without the div wrapper?What would be a use case for this?
Perhaps just validating that it is a string is good enough?
The text was updated successfully, but these errors were encountered: