diff --git a/src/Fast404.php b/src/Fast404.php index 0939279bcb6f0f6698804e0480c48845e60ed1e1..1629cdaf891704c64102063400f669bfdf738f2a 100644 --- a/src/Fast404.php +++ b/src/Fast404.php @@ -2,10 +2,11 @@ namespace Drupal\fast404; -use Drupal\Core\Site\Settings; +use Drupal\Component\Render\FormattableMarkup; +use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Database\Database; +use Drupal\Core\Site\Settings; use Drupal\Core\StringTranslation\StringTranslationTrait; -use Drupal\Component\Render\FormattableMarkup; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException; @@ -211,7 +212,7 @@ class Fast404 { return $response; } $response->send(); - throw new ServiceUnavailableHttpException(3, 'The requested URL "@path" was not found on this server. Try again shortly.', ['@path' => $this->request->getPathInfo()]); + throw new ServiceUnavailableHttpException(3, 'The requested URL "' . UrlHelper::stripDangerousProtocols($this->request->getPathInfo()) . '" was not found on this server. Try again shortly.'); } /**