Patched to Drupal 8.4.8 level. See https://www.drupal.org/sa-core-2018-004 and patch...
[yaffs-website] / web / core / lib / Drupal / Core / PathProcessor / PathProcessorDecode.php
1 <?php
2
3 namespace Drupal\Core\PathProcessor;
4
5 use Symfony\Component\HttpFoundation\Request;
6
7 /**
8  * Processes the inbound path by urldecoding it.
9  *
10  * Parameters in the URL sometimes represent code-meaningful strings. It is
11  * therefore useful to always urldecode() those values so that individual
12  * controllers need not concern themselves with it. This is Drupal-specific
13  * logic and may not be familiar for developers used to other Symfony-family
14  * projects.
15  *
16  * @todo Revisit whether or not this logic is appropriate for here or if
17  *   controllers should be required to implement this logic themselves. If we
18  *   decide to keep this code, remove this TODO.
19  */
20 class PathProcessorDecode implements InboundPathProcessorInterface {
21
22   /**
23    * {@inheritdoc}
24    */
25   public function processInbound($path, Request $request) {
26     return urldecode($path);
27   }
28
29 }