[Webkit-unassigned] [Bug 225299] Constructing a FormData from a form can lead to entries with lone surrogates

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 30 08:58:59 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=225299

--- Comment #7 from Chris Dumez <cdumez at apple.com> ---
(In reply to Andreu Botella from comment #6)
> Comment on attachment 445352 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=445352&action=review
> 
> >> Source/WebCore/html/DOMFormData.cpp:81
> >> +    return { usvName, usvValue };
> > 
> > We could write this in a more concise way:
> > 
> > return {
> >     replaceUnpairedSurrogatesWithReplacementCharacter(String { usvName }),
> >     replaceUnpairedSurrogatesWithReplacementCharacter(String { usvValue })
> > };
> 
> I still don't fully understand how && and std::move work, and I didn't
> realize you could write it that way.
> 
> >> Source/WebCore/html/DOMFormData.h:83
> >> +    Item createStringEntry(const String& name, const String& value);
> > 
> > It seems this can be static. Also, since it is private, no need to declare it in the header.
> 
> I'll also be removing createFileEntry from the header then, for consistency.

Yes, please.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211130/4f7d6d49/attachment.htm>


More information about the webkit-unassigned mailing list