diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php
index 0cb28f7ebd8f4fb531b4c9205b8b7a3de5f214ff..f0c03c858b815d9f286344c7edcc7b5699cd7dca 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php
@@ -1642,7 +1642,7 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
         //       . "&password=" . $password
         // );
         $idObj = $this->makeRequest(
-            "LookupPatron" . "&id=" . $username
+            "LookupPatron" . "&id=" . urlencode($username)
             . "&id_type=userid"
         );