mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Merge pull request #2381 from Antogin/dev
Escape Pipe character when inserting a URL into a table
This commit is contained in:
@@ -604,7 +604,10 @@ export default class CodeEditor extends React.Component {
|
|||||||
body,
|
body,
|
||||||
'text/html'
|
'text/html'
|
||||||
)
|
)
|
||||||
const linkWithTitle = `[${parsedBody.title}](${pastedTxt})`
|
const escapePipe = (str) => {
|
||||||
|
return str.replace('|', '\\|')
|
||||||
|
}
|
||||||
|
const linkWithTitle = `[${escapePipe(parsedBody.title)}](${pastedTxt})`
|
||||||
resolve(linkWithTitle)
|
resolve(linkWithTitle)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
reject(e)
|
reject(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user