mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
streams: Fix malformed stream name slugs.
The stream_data.id_to_slug and stream_data.name_to_slug functions mistakenly used Javascript's String.replace method, this commit changes it to use String.replaceAll, the result being slugs generated from streams with names greater than 2 words are now properly formatted.
This commit is contained in:
@@ -556,12 +556,12 @@ test("marked", () => {
|
||||
{
|
||||
input: "#**& & &**",
|
||||
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>',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user