diff --git a/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php b/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php
index 08d0083..8e8deda 100644
--- a/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php
+++ b/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php
@@ -10,6 +10,7 @@
 use Drupal\Component\Utility\String;
 use Drupal\Component\Utility\UrlHelper;
 use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\Core\PathProcessor\PathProcessorManager;
 use Symfony\Component\HttpFoundation\RequestStack;
 
 /**
@@ -27,17 +28,27 @@ class UnroutedUrlAssembler implements UnroutedUrlAssemblerInterface {
   protected $requestStack;
 
   /**
+   * The path processor manager.
+   *
+   * @var \Drupal\Core\PathProcessor\PathProcessorManager
+   */
+  protected $pathProcessor;
+
+  /**
    *  Constructs a new unroutedUrlAssembler object.
    *
-   * @param \Drupal\Core\Config\ConfigFactoryInterface $config
-   *    The config factory.
    * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
    *   A request stack object.
+   * @param \Drupal\Core\Config\ConfigFactoryInterface $config
+   *    The config factory.
+   * @param \Drupal\Core\PathProcessor\PathProcessorManager $path_processor
+   *   The path processor manager.
    */
-  public function __construct(RequestStack $request_stack, ConfigFactoryInterface $config) {
+  public function __construct(RequestStack $request_stack, ConfigFactoryInterface $config, PathProcessorManager $path_processor) {
     $allowed_protocols = $config->get('system.filter')->get('protocols') ?: ['http', 'https'];
     UrlHelper::setAllowedProtocols($allowed_protocols);
     $this->requestStack = $request_stack;
+    $this->pathProcessor = $path_processor;
   }
 
   /**
@@ -99,9 +110,16 @@ protected function buildLocalUrl($uri, array $options = []) {
 
     // Remove the base:// scheme.
     $uri = substr($uri, 7);
+
+    // Allow path processing, if needed.
+    if (!empty($options['path_processing'])) {
+      $this->pathProcessor->processOutbound($uri, $options);
+    }
+
     // Add any subdirectory where Drupal is installed.
     $current_base_path = $request->getBasePath() . '/';
 
+
     if ($options['absolute']) {
       $current_base_url = $request->getSchemeAndHttpHost() . $current_base_path;
       if (isset($options['https'])) {
@@ -126,6 +144,7 @@ protected function buildLocalUrl($uri, array $options = []) {
 
     $uri = str_replace('%2F', '/', rawurlencode($prefix . $uri));
     $query = $options['query'] ? ('?' . UrlHelper::buildQuery($options['query'])) : '';
+
     return $base . $options['script'] . $uri . $query . $options['fragment'];
   }
 
