[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:05 PST 2021


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

--- Comment #6 from Andreu Botella <andreu at andreubotella.com> ---
Comment on attachment 445352
  --> https://bugs.webkit.org/attachment.cgi?id=445352
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.

-- 
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/46048470/attachment.htm>


More information about the webkit-unassigned mailing list