diff --git a/source b/source index e4c174919c6..08d96b29a74 100644 --- a/source +++ b/source @@ -56061,9 +56061,12 @@ fur
Mutate action URL
+

Let pairs be the result of converting to a list of name-value pairs with entry list.

+

Let query be the result of running the - application/x-www-form-urlencoded serializer with entry - list and encoding.

+ application/x-www-form-urlencoded serializer with pairs + and encoding.

Set parsed action's query component to query.

@@ -56079,9 +56082,12 @@ fur
application/x-www-form-urlencoded
+

Let pairs be the result of converting to a list of name-value pairs with entry list.

+

Let body be the result of running the - application/x-www-form-urlencoded serializer with entry - list and encoding.

+ application/x-www-form-urlencoded serializer with pairs + and encoding.

Set body to the result of encoding body.

@@ -56106,8 +56112,11 @@ fur
text/plain
+

Let pairs be the result of converting to a list of name-value pairs with entry list.

+

Let body be the result of running the text/plain - encoding algorithm with entry list.

+ encoding algorithm with pairs.

Set body to the result of encoding body using encoding.

@@ -56133,9 +56142,12 @@ fur
Mail with headers
+

Let pairs be the result of converting to a list of name-value pairs with entry list.

+

Let headers be the result of running the - application/x-www-form-urlencoded serializer with entry - list and encoding.

+ application/x-www-form-urlencoded serializer with pairs + and encoding.

Replace occurrences of U+002B PLUS SIGN characters (+) in headers with the string "%20".

@@ -56148,6 +56160,9 @@ fur
Mail as body
+

Let pairs be the result of converting to a list of name-value pairs with entry list.

+

Switch on enctype:

@@ -56155,7 +56170,7 @@ fur

Let body be the result of running the text/plain - encoding algorithm with entry list.

+ encoding algorithm with pairs.

Set body to the result of running UTF-8 percent-encode on body using the default encode set.

@@ -56164,8 +56179,8 @@ fur
Otherwise

Let body be the result of running the - application/x-www-form-urlencoded serializer with entry - list and encoding.

+ application/x-www-form-urlencoded serializer with pairs + and encoding.

If parsed action's query is null, then @@ -56497,6 +56512,47 @@ fur +

+ +
Converting an entry list to a list of name-value pairs
+ +

The application/x-www-form-urlencoded and text/plain encoding algorithms take a list of name-value pairs, where the values + must be strings, rather than an entry list where the value can be a File. The + following algorithm performs the conversion.

+ +

To convert to a list of name-value pairs an entry list entry list, run + these steps:

+ +
    +
  1. Let list be an empty list of name-value pairs.

  2. + +
  3. +

    For each entry of entry list:

    + +
      +
    1. Let name be entry's name, with every occurrence of U+000D (CR) not + followed by U+000A (LF), and every occurrence of U+000A (LF) not preceded by U+000D (CR), + replaced by a string consisting of U+000D (CR) and U+000A (LF).

    2. + +
    3. If entry's value is a File object, then let value be + entry's value's name. Otherwise, let + value be entry's value.

    4. + +
    5. Replace every occurrence of U+000D (CR) not followed by U+000A (LF), and every occurrence + of U+000A (LF) not preceded by U+000D (CR), in value, by a string consisting of + U+000D (CR) and U+000A (LF).

    6. + +
    7. Append to list a new name-value pair whose + name is name and whose value is value.

    8. +
    +
  4. + +
  5. Return list.

  6. +
+ +
+
URL-encoded form data
@@ -56518,6 +56574,21 @@ fur list and encoding, is as follows:

    +
  1. +

    For each entry of entry list:

    + +
      +
    1. Replace every occurrence of U+000D (CR) not followed by U+000A (LF), and every + occurrence of U+000A (LF) not preceded by U+000D (CR), in entry's name, by a string + consisting of a U+000D (CR) and U+000A (LF).

    2. + +
    3. If entry's value is not a File object, then replace every + occurrence of U+000D (CR) not followed by U+000A (LF), and every occurrence of U+000A (LF) not + preceded by U+000D (CR), in entry's value, by a string consisting of a U+000D (CR) + and U+000A (LF).

    4. +
    +
  2. +
  3. Return the byte sequence resulting from encoding the entry list using the rules described by RFC 7578, Returning Values from Forms: -

    The text/plain encoding algorithm, given an entry - list, is as follows:

    +

    The text/plain encoding algorithm, given a list of name-value + pairs pairs, is as follows:

    1. Let result be the empty string.

    2. -

      For each entry in entry list:

      +

      For each pair in pairs:

        -
      1. If the entry's value is a File object, then set its value to the - File object's name.

      2. - -
      3. Append the entry's name to result.

      4. +
      5. Append pair's name to result.

      6. Append a single U+003D EQUALS SIGN character (=) to result.

      7. -
      8. Append the entry's value to result.

      9. +
      10. Append pair's value to result.

      11. Append a U+000D CARRIAGE RETURN (CR) U+000A LINE FEED (LF) character pair to result.