1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

added export escape html config

This commit is contained in:
Nguyễn Việt Hưng
2018-05-19 19:39:08 +07:00
parent 52f694a714
commit d6c28da3a8
4 changed files with 135 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ import copy from 'copy-to-clipboard'
import mdurl from 'mdurl'
import exportNote from 'browser/main/lib/dataApi/exportNote'
import { escapeHtmlCharacters } from 'browser/lib/utils'
import ConfigManager from 'browser/main/lib/ConfigManager'
const { remote } = require('electron')
const attachmentManagement = require('../main/lib/dataApi/attachmentManagement')
@@ -218,7 +219,7 @@ export default class MarkdownPreview extends React.Component {
const {fontFamily, fontSize, codeBlockFontFamily, lineNumber, codeBlockTheme, scrollPastEnd, theme} = this.getStyleParams()
const inlineStyles = buildStyle(fontFamily, fontSize, codeBlockFontFamily, lineNumber, scrollPastEnd, theme)
let body = this.markdown.render(escapeHtmlCharacters(noteContent))
let body = this.markdown.render(ConfigManager.get().exports.escapeHtml ? escapeHtmlCharacters(noteContent) : noteContent)
const files = [this.GetCodeThemeLink(codeBlockTheme), ...CSS_FILES]
const attachmentsAbsolutePaths = attachmentManagement.getAbsolutePathsOfAttachmentsInContent(noteContent, this.props.storagePath)