diff --git a/src/core/components/providers/markdown.jsx b/src/core/components/providers/markdown.jsx
index ef95c6ae..2ef8b6a6 100644
--- a/src/core/components/providers/markdown.jsx
+++ b/src/core/components/providers/markdown.jsx
@@ -30,6 +30,9 @@ export default Markdown
const sanitizeOptions = {
allowedTags: sanitize.defaults.allowedTags.concat([ "h1", "h2", "img" ]),
+ allowedAttributes: {
+ "img": sanitize.defaults.allowedAttributes.img.concat(["title"])
+ },
textFilter: function(text) {
return text.replace(/"/g, "\"")
}
diff --git a/test/components/markdown.js b/test/components/markdown.js
index 6dd87053..01a55e1c 100644
--- a/test/components/markdown.js
+++ b/test/components/markdown.js
@@ -5,34 +5,44 @@ import { render } from "enzyme"
import Markdown from "components/providers/markdown"
import { Markdown as OAS3Markdown } from "corePlugins/oas3/wrap-components/markdown.js"
-describe.only("Markdown component", function() {
- describe("Swagger 2.0", function() {
- it("allows heading elements", function() {
- const str = `
+describe("Markdown component", function() {
+ describe("Swagger 2.0", function() {
+ it("allows image elements", function() {
+ const str = ``
+ const el = render(