Merge branch 'mp/hotfix/2021-1-22' (#4327)

* origin/mp/hotfix/2021-1-22:
  chat: disallow markdown links
  landscape: downgrade formik to 2.1.5
  chat: disallow markdown nodes

Signed-off-by: Matilde Park <matilde.park@gmail.com>
This commit is contained in:
Matilde Park 2021-01-22 17:06:08 -05:00
commit 8b4aa8755f
4 changed files with 553 additions and 2569 deletions

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@
"codemirror": "^5.59.2",
"css-loader": "^3.6.0",
"file-saver": "^2.0.5",
"formik": "^2.2.6",
"formik": "^2.1.5",
"immer": "^8.0.1",
"lodash": "^4.17.20",
"markdown-to-jsx": "^6.11.4",

View File

@ -292,7 +292,8 @@ export const MessageContent = ({ content, contacts, measure, fontSize, group })
}}
textProps={{style: {
fontSize: 'inherit',
textDecoration: 'underline'
borderBottom: '1px solid',
textDecoration: 'none'
}}}
/>
</Box>

View File

@ -53,6 +53,9 @@ const MessageMarkdown = React.memo(props => (
{...props}
unwrapDisallowed={true}
renderers={renderers}
// shim until we uncover why RemarkBreaks and
// RemarkDisableTokenizers can't be loaded simultaneously
disallowedTypes={['heading', 'list', 'listItem', 'link']}
allowNode={(node, index, parent) => {
if (
node.type === 'blockquote'
@ -67,11 +70,7 @@ const MessageMarkdown = React.memo(props => (
return true;
}}
plugins={[[
RemarkBreaks,
RemarkDisableTokenizers,
{ block: DISABLED_BLOCK_TOKENS, inline: DISABLED_INLINE_TOKENS }
]]} />
plugins={[RemarkBreaks]} />
));