remove potentially malformed Markdown