1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

Escape Pipe symbols to prevent tables from braking

This commit is contained in:
antogyn
2018-09-07 13:44:32 +02:00
parent bdfe233472
commit c9db3f98d1

View File

@@ -516,7 +516,10 @@ export default class CodeEditor extends React.Component {
body,
'text/html'
)
const linkWithTitle = `[${parsedBody.title}](${pastedTxt})`
const escapePipe = (str) => {
return str.replace('|', '\\|')
}
const linkWithTitle = `[${escapePipe(parsedBody.title)}](${pastedTxt})`
resolve(linkWithTitle)
} catch (e) {
reject(e)