From f989b1e756087431cb523daa0a5a0ce956179ba0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuli=20Sillanp=C3=A4=C3=A4?= <samuli.sillanpaa@gmail.com>
Date: Tue, 13 Nov 2018 16:03:26 +0200
Subject: [PATCH] Url encode record id in hierarchy tree links. (#1266)

---
 module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php
index d51686756fb..c1fb104367c 100644
--- a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php
+++ b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php
@@ -251,7 +251,7 @@ class JSTree extends AbstractBase
             ];
             $cache[$route] = $this->router->fromRoute($route, $params, $options);
         }
-        return str_replace('__record_id__', $id, $cache[$route]);
+        return str_replace('__record_id__', urlencode($id), $cache[$route]);
     }
 
     /**
-- 
GitLab