src/Services/Fragments.php
BeforeProposed
+1−1
55 public static function decode(string $fragment): string {
66 if (preg_match('/%(?![0-9A-Fa-f]{2})/', $fragment)) throw new \InvalidArgumentException('invalid-fragment');
77 // URL fragments use percent escapes. A literal plus is not a space.
8 $decoded=urldecode($fragment);
8 $decoded=rawurldecode($fragment);
99 if (!preg_match('//u',$decoded)) throw new \InvalidArgumentException('invalid-fragment');
1010 return $decoded;
1111 }