mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Escape html characters before convert to HTML
This commit is contained in:
@@ -13,6 +13,7 @@ import htmlTextHelper from 'browser/lib/htmlTextHelper'
|
||||
import copy from 'copy-to-clipboard'
|
||||
import mdurl from 'mdurl'
|
||||
import exportNote from 'browser/main/lib/dataApi/exportNote'
|
||||
import {escapeHtmlCharacters} from 'browser/lib/utils'
|
||||
|
||||
const { remote } = require('electron')
|
||||
const { app } = remote
|
||||
@@ -208,7 +209,7 @@ export default class MarkdownPreview extends React.Component {
|
||||
const {fontFamily, fontSize, codeBlockFontFamily, lineNumber, codeBlockTheme} = this.getStyleParams()
|
||||
|
||||
const inlineStyles = buildStyle(fontFamily, fontSize, codeBlockFontFamily, lineNumber, codeBlockTheme, lineNumber)
|
||||
const body = this.markdown.render(noteContent)
|
||||
const body = this.markdown.render(escapeHtmlCharacters(noteContent))
|
||||
const files = [this.GetCodeThemeLink(codeBlockTheme), ...CSS_FILES]
|
||||
|
||||
files.forEach((file) => {
|
||||
|
||||
Reference in New Issue
Block a user