From 5144c0ecdc6b461cda58d713fac68811611edcd3 Mon Sep 17 00:00:00 2001 From: David Nagle Date: Fri, 19 Oct 2018 14:17:06 -0700 Subject: [PATCH] Fixed "Save as HTML" to respect blockquotes. 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. --- browser/components/MarkdownPreview.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/browser/components/MarkdownPreview.js b/browser/components/MarkdownPreview.js index bef6a976..6643d796 100755 --- a/browser/components/MarkdownPreview.js +++ b/browser/components/MarkdownPreview.js @@ -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' @@ -331,9 +330,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,