summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-11-06 12:39:49 -0500
committerJoram Wilander <jwawilander@gmail.com>2015-11-06 12:39:49 -0500
commit8d7f1c1705cb904d1cf5ad99f8fdafd7530517f0 (patch)
tree42add1e8d18cffef0000318b430f6a6e7ec34864 /web
parent190adae0c9e36912930663429d185b94cfbef1bd (diff)
parent5fd8b56836595d6fa1fe2cb0d0a9c9474fc4dfdd (diff)
downloadchat-8d7f1c1705cb904d1cf5ad99f8fdafd7530517f0.tar.gz
chat-8d7f1c1705cb904d1cf5ad99f8fdafd7530517f0.tar.bz2
chat-8d7f1c1705cb904d1cf5ad99f8fdafd7530517f0.zip
Merge pull request #1340 from mattermost/markdown-image-fixes
Markdown image fixes.
Diffstat (limited to 'web')
-rw-r--r--web/react/utils/markdown.jsx2
-rw-r--r--web/sass-files/sass/partials/_markdown.scss11
2 files changed, 8 insertions, 5 deletions
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index 374caf6dc..ee63b8689 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -94,7 +94,7 @@ class MattermostMarkdownRenderer extends marked.Renderer {
if (title) {
out += ' title="' + title + '"';
}
- out += ' onload="window.markdownImageLoaded(this)" class="markdown-inline-img"';
+ out += ' onload="window.markdownImageLoaded(this)" onerror="window.markdownImageLoaded(this)" class="markdown-inline-img"';
out += this.options.xhtml ? '/>' : '>';
return out;
}
diff --git a/web/sass-files/sass/partials/_markdown.scss b/web/sass-files/sass/partials/_markdown.scss
index 241377252..8b0a32704 100644
--- a/web/sass-files/sass/partials/_markdown.scss
+++ b/web/sass-files/sass/partials/_markdown.scss
@@ -8,11 +8,14 @@
margin-left: 4px;
}
}
-.markdown-inline-img {
- -moz-force-broken-image-icon: 1;
- max-height: 500px;
- height: 500px;
+#post-list {
+ .markdown-inline-img {
+ -moz-force-broken-image-icon: 1;
+ max-height: 500px;
+ height: 500px;
+ }
}
+
.post-body {
hr {
height: 4px;