Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit ac7991c

Browse files
committed
Add comment
1 parent 9c8bc58 commit ac7991c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/HtmlUtils.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ const transformTags: IExtendedSanitizeOptions["transformTags"] = { // custom to
172172
// Strip out imgs that aren't `mxc` here instead of using allowedSchemesByTag
173173
// because transformTags is used _before_ we filter by allowedSchemesByTag and
174174
// we don't want to allow images with `https?` `src`s.
175+
// We also drops inline images (as if they were not present at all) when the "show
176+
// images" preference is disabled. Future work might expose some UI to reveal them
177+
// like standalone image events have.
175178
if (!attribs.src || !attribs.src.startsWith('mxc://') || !SettingsStore.getValue("showImages")) {
176179
return { tagName, attribs: {}};
177180
}

0 commit comments

Comments
 (0)