From a8793f3b799f036fa5ba6067e8c775afa02936a3 Mon Sep 17 00:00:00 2001 From: Darren Oh <2293701+darrenoh@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:50:07 -0500 Subject: [PATCH] Add function drupal_encode_path() --- src/functions/common.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/functions/common.php b/src/functions/common.php index fb103e0..133870b 100644 --- a/src/functions/common.php +++ b/src/functions/common.php @@ -23,6 +23,11 @@ use Retrofit\Drupal\Render\AttachmentResponseSubscriber; use Symfony\Component\HttpFoundation\RedirectResponse; +function drupal_encode_path(string $path): string +{ + return UrlHelper::encodePath($path); +} + /** * @todo flush out * this cannot call Url objects because they may generate routes and could