This commit adds support for empty string as a valid topic name
in syntax for linking to channel messages.
The server stores it after empty string is replaced with
`realm_empty_topic_display_name` and wrapped with an <em> tag.
The web client parses the rendered_content and updates
the topic_name part in the HTML with topic_name in user's language
+ wraps it in a <span> tag with 'empty-topic-display' css class.
This commit adds support for empty string as a valid topic name
in syntax for linking to topics.
The server stores it after empty string is replaced with
`realm_empty_topic_display_name` and wrapped with an <em> tag.
The web client parses the rendered_content and updates
the topic_name part in the HTML with topic_name in user's language
+ wraps it in a <span> tag with 'empty-topic-display' css class.
This commit updates 'handleStreamTopic' & 'handleStreamTopicMessage'
to use handlebar templates for the rendering.
We avoid using JS template literals for constructing complex HTML
that requires escaping.
This is a followup to #31965 where we added
support for a new syntax for message links.
The frontend markdown processor didn't local
echo the syntax properly, resulting in a
rendering glitch in the messages.