Skip to content

Commit 03b8dbb

Browse files
authored
Merge pull request #2381 from Antogin/dev
Escape Pipe character when inserting a URL into a table
2 parents 80af8dc + c9db3f9 commit 03b8dbb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

browser/components/CodeEditor.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,10 @@ export default class CodeEditor extends React.Component {
604604
body,
605605
'text/html'
606606
)
607-
const linkWithTitle = `[${parsedBody.title}](${pastedTxt})`
607+
const escapePipe = (str) => {
608+
return str.replace('|', '\\|')
609+
}
610+
const linkWithTitle = `[${escapePipe(parsedBody.title)}](${pastedTxt})`
608611
resolve(linkWithTitle)
609612
} catch (e) {
610613
reject(e)

0 commit comments

Comments
 (0)