Преглед на файлове

Fix percent encoding of fragments (closes #491)

> test result: FAILED. 637 passed; 76 failed; 0 ignored; 0 measured
Anthony Ramine преди 7 години
родител
ревизия
fa9f04487b
променени са 1 файла, в които са добавени 2 реда и са изтрити 8 реда
  1. 2 8
      src/parser.rs

+ 2 - 8
src/parser.rs

@@ -1329,14 +1329,8 @@ impl<'a> Parser<'a> {
                 self.log_violation(SyntaxViolation::NullInFragment)
                 self.log_violation(SyntaxViolation::NullInFragment)
             } else {
             } else {
                 self.check_url_code_point(c, &input);
                 self.check_url_code_point(c, &input);
-                self.serialization.extend(utf8_percent_encode(
-                    utf8_c,
-                    // FIXME: tests fail when we use the FRAGMENT set here
-                    // as defined in the spec as of 2019-07-17,
-                    // likely because tests are out of date.
-                    // See https://github.com/servo/rust-url/issues/290
-                    CONTROLS,
-                ));
+                self.serialization
+                    .extend(utf8_percent_encode(utf8_c, FRAGMENT));
             }
             }
         }
         }
     }
     }