Web: Markdown image with an SVG briefly displayed for sender with EnableSVGs set to false

Description

This is happening because the web app relies on the server to tell it whether or not a link is an SVG. When you first create a post, the web app briefly displays a pending post that wasn't sent by the server, so it doesn't know yet that the image shouldn't be displayed. Once the post is properly created, the server will tell the client that the image is an SVG, so the client knows not to display it.

Repro steps:
1) Go to System Console > Site Configuration > Posts and set Enable SVGs to false
2) Post an SVG as a markdown image (like `![svg](<link to SVG>)`)

Observed: The SVG is briefly visible to the user who made the post. No other users see the SVG.
Expected: The SVG isn't visible to any user.

QA Test Steps

See description

Reporter

None

Mana

2

Assignee

Harrison Healey

QA Assignee

Lindy Isherwood

Reporter

Harrison Healey

Epic Link

None

Fix versions

Mattermost Team

Apps

Sprint

None

Labels

None

QA Testing Areas

Messages

GitHub Issue

None

Components

None

Severity

None
Configure