1
0
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:
Junyoung Choi (Sai)
2018-09-15 13:26:02 +09:00
committed by GitHub

View File

@@ -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)