Skip to content

Commit

Permalink
Fixed "Save as HTML" to respect blockquotes.
Browse files Browse the repository at this point in the history
When saving as HTML, the raw text was being HTML escaped prior to
running it through markdown. This was preventing blockquotes from
rendering because greater-than signs were escaped. The HTML escaping
seems unneeded since the markdown renderer already takes care of it,
and it also wasn't consistent with how markdown was being rendered
within the application.
  • Loading branch information
nagledb committed Oct 19, 2018
1 parent ff30266 commit b316301
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions browser/components/MarkdownPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import convertModeName from 'browser/lib/convertModeName'
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 context from 'browser/lib/context'
import i18n from 'browser/lib/i18n'
import fs from 'fs'
Expand Down Expand Up @@ -325,9 +324,7 @@ export default class MarkdownPreview extends React.Component {
allowCustomCSS,
customCSS
)
let body = this.markdown.render(
escapeHtmlCharacters(noteContent, { detectCodeBlock: true })
)
let body = this.markdown.render(noteContent)
const files = [this.GetCodeThemeLink(codeBlockTheme), ...CSS_FILES]
const attachmentsAbsolutePaths = attachmentManagement.getAbsolutePathsOfAttachmentsInContent(
noteContent,
Expand Down

0 comments on commit b316301

Please sign in to comment.