mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
Merge pull request #1579 from matrix-org/luke/fix-img-no-src-bug
Ignore img tags in HTML if src is not specified
This commit is contained in:
commit
17ae37bd3b
1 changed files with 1 additions and 1 deletions
|
@ -208,7 +208,7 @@ const sanitizeHtmlParams = {
|
|||
// Strip out imgs that aren't `mxc` here instead of using allowedSchemesByTag
|
||||
// because transformTags is used _before_ we filter by allowedSchemesByTag and
|
||||
// we don't want to allow images with `https?` `src`s.
|
||||
if (!attribs.src.startsWith('mxc://')) {
|
||||
if (!attribs.src || !attribs.src.startsWith('mxc://')) {
|
||||
return { tagName, attribs: {}};
|
||||
}
|
||||
attribs.src = MatrixClientPeg.get().mxcUrlToHttp(
|
||||
|
|
Loading…
Reference in a new issue