From a9d4f5efde0e3ce7bf2f78e5c9623b0f573984e0 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Wed, 7 Jun 2017 12:52:59 -0700 Subject: [PATCH] Add filter to un-double-escape quotation marks --- src/core/components/providers/markdown.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/components/providers/markdown.jsx b/src/core/components/providers/markdown.jsx index 361e4580..d058d176 100644 --- a/src/core/components/providers/markdown.jsx +++ b/src/core/components/providers/markdown.jsx @@ -2,8 +2,15 @@ import React, { PropTypes } from "react" import Remarkable from "react-remarkable" import sanitize from "sanitize-html" +const sanitizeOptions = { + textFilter: function(text) { + return text + .replace(/"/g, "\"") + } +} + function Markdown({ source }) { - const sanitized = sanitize(source) + const sanitized = sanitize(source, sanitizeOptions) return