Skip to content

script: Encode <form enctype="text/plain"> correctly - #45111

Merged
yezhizhen merged 3 commits into
servo:mainfrom
yezhizhen:form
May 25, 2026
Merged

yezhizhen merged 3 commits into
servo:mainfrom
yezhizhen:form

Conversation

@yezhizhen

Copy link
Copy Markdown
Member

Part of #10778.
This should be the last piece of enctype to correctly encode.

Testing: Existing wpt.

yezhizhen added 2 commits May 24, 2026 11:09
Signed-off-by: Euclid Ye <[email protected]>
.
Signed-off-by: Euclid Ye <[email protected]>
@yezhizhen
yezhizhen requested a review from xiaochengh May 24, 2026 08:32
@yezhizhen
yezhizhen requested a review from gterzian as a code owner May 24, 2026 08:32
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 24, 2026

@TimvdLippe TimvdLippe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the spec steps should be inside the algorithm. That also avoids all of those clippy warnings.

/// 3. Return result.
fn encode_plaintext(pairs: impl Iterator<Item = (String, String)>) -> String {
let mut result = String::new();
for (name, value) in pairs {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than having the steps in the rust doc, instead add them here. The rust doc should only be a link to the spec

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label May 24, 2026
@yezhizhen
yezhizhen marked this pull request as draft May 24, 2026 12:42
@yezhizhen
yezhizhen marked this pull request as ready for review May 25, 2026 07:56
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 25, 2026
@yezhizhen
yezhizhen added this pull request to the merge queue May 25, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label May 25, 2026
Merged via the queue into servo:main with commit 63794f6 May 25, 2026
33 checks passed
@yezhizhen
yezhizhen deleted the form branch May 25, 2026 09:29
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants