Node.js based forum software built for the modern web
fix: encode nid in client-side when marking notifications read/unread
Julian Lam4c1f6b1f5690
diff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.jsindex 69f4bb95c4..60d48fff3c 100644--- a/public/src/modules/notifications.js+++ b/public/src/modules/notifications.js@@ -112,7 +112,7 @@ define('notifications', [function markNotification(nid, read, callback) {if (read) {- api.put(`/notifications/${nid}/read`).then(() => {+ api.put(`/notifications/${encodeURIComponent(nid)}/read`).then(() => {if (unreadNotifs[nid]) {delete unreadNotifs[nid];}@@ -121,7 +121,7 @@ define('notifications', [}}).catch(alerts.error);} else {- api.del(`/notifications/${nid}/read`).then(callback).catch(alerts.error);+ api.del(`/notifications/${encodeURIComponent(nid)}/read`).then(callback).catch(alerts.error);}}