Преглед изворни кода

Add filter to un-double-escape quotation marks

bubble
Kyle Shockey пре 7 година
родитељ
комит
a9d4f5efde
1 измењених фајлова са 8 додато и 1 уклоњено
  1. +8
    -1
      src/core/components/providers/markdown.jsx

+ 8
- 1
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 <Remarkable
options={{html: true, typographer: true, linkify: true, linkTarget: "_blank"}}
source={sanitized}


Loading…
Откажи
Сачувај