diff options
Diffstat (limited to 'webapp/utils')
-rw-r--r-- | webapp/utils/constants.jsx | 6 | ||||
-rw-r--r-- | webapp/utils/markdown.jsx | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index 8428f7121..3678b0b07 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -281,6 +281,10 @@ export const StatTypes = keyMirror({ MONTHLY_ACTIVE_USERS: null }); +export const ErrorPageTypes = { + LOCAL_STORAGE: 'local_storage' +}; + export const Constants = { Preferences, SocketEvents, @@ -290,6 +294,8 @@ export const Constants = { UserSearchOptions, TutorialSteps, PostTypes, + ErrorPageTypes, + IGNORE_POST_TYPES: [PostTypes.JOIN_LEAVE, PostTypes.JOIN_CHANNEL, PostTypes.LEAVE_CHANNEL, PostTypes.REMOVE_FROM_CHANNEL, PostTypes.ADD_TO_CHANNEL, PostTypes.ADD_REMOVE], PayloadSources: keyMirror({ diff --git a/webapp/utils/markdown.jsx b/webapp/utils/markdown.jsx index db8e739e6..29547b7e1 100644 --- a/webapp/utils/markdown.jsx +++ b/webapp/utils/markdown.jsx @@ -163,6 +163,10 @@ class MattermostMarkdownRenderer extends marked.Renderer { link(href, title, text) { let outHref = href; + if (this.formattingOptions.linkFilter && !this.formattingOptions.linkFilter(outHref)) { + return text; + } + try { let unescaped = unescape(href); try { |