Skip to content

Commit c9db3f9

Browse files
committed
Escape Pipe symbols to prevent tables from braking
1 parent bdfe233 commit c9db3f9

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
@@ -516,7 +516,10 @@ export default class CodeEditor extends React.Component {
516516
body,
517517
'text/html'
518518
)
519-
const linkWithTitle = `[${parsedBody.title}](${pastedTxt})`
519+
const escapePipe = (str) => {
520+
return str.replace('|', '\\|')
521+
}
522+
const linkWithTitle = `[${escapePipe(parsedBody.title)}](${pastedTxt})`
520523
resolve(linkWithTitle)
521524
} catch (e) {
522525
reject(e)

0 commit comments

Comments
 (0)