Correct, escape if # is not followed by whitespace. Mattermost markdown is based on GitLab Flavored Markdown: <a href="https:&#x2F;&#x2F;gitlab.com&#x2F;gitlab-org&#x2F;gitlab-ce&#x2F;blob&#x2F;6-4-stable&#x2F;doc&#x2F;markdown&#x2F;markdown.md" rel="nofollow">https:&#x2F;&#x2F;gitlab.com&#x2F;gitlab-org&#x2F;gitlab-ce&#x2F;blob&#x2F;6-4-stable&#x2F;doc&#x2F;...</a>