Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
streams: Fix malformed stream name slugs.
Austin Riba980fd2f97601
diff --git a/frontend_tests/node_tests/markdown.js b/frontend_tests/node_tests/markdown.jsindex 88263406f2f..916a6827b6e 100644--- a/frontend_tests/node_tests/markdown.js+++ b/frontend_tests/node_tests/markdown.js@@ -556,12 +556,12 @@ test("marked", () => {{input: "#**& & &amp;**",expected:- '<p><a class="stream" data-stream-id="5" href="/#narrow/stream/5-.26-.26.20.26amp.3B">#& & &amp;</a></p>',+ '<p><a class="stream" data-stream-id="5" href="/#narrow/stream/5-.26-.26-.26amp.3B">#& & &amp;</a></p>',},{input: "#**& & &amp;>& & &amp;**",expected:- '<p><a class="stream-topic" data-stream-id="5" href="/#narrow/stream/5-.26-.26.20.26amp.3B/topic/.26.20.26.20.26amp.3B">#& & &amp; > & & &amp;</a></p>',+ '<p><a class="stream-topic" data-stream-id="5" href="/#narrow/stream/5-.26-.26-.26amp.3B/topic/.26.20.26.20.26amp.3B">#& & &amp; > & & &amp;</a></p>',},];diff --git a/static/js/stream_data.js b/static/js/stream_data.jsindex 91137c2025b..673de04c2e6 100644--- a/static/js/stream_data.js+++ b/static/js/stream_data.js@@ -282,7 +282,7 @@ export function id_to_slug(stream_id) {// The name part of the URL doesn't really matter, so we try to// make it pretty.- name = name.replace(" ", "-");+ name = name.replaceAll(" ", "-");return stream_id + "-" + name;}@@ -296,7 +296,7 @@ export function name_to_slug(name) {// The name part of the URL doesn't really matter, so we try to// make it pretty.- name = name.replace(" ", "-");+ name = name.replaceAll(" ", "-");return stream_id + "-" + name;}