diff --git a/app/assets/javascripts/discourse/lib/markdown.js b/app/assets/javascripts/discourse/lib/markdown.js index 983dbb9d8..4eb053733 100644 --- a/app/assets/javascripts/discourse/lib/markdown.js +++ b/app/assets/javascripts/discourse/lib/markdown.js @@ -323,3 +323,4 @@ Discourse.Markdown.whiteListTag('span', 'bbcode-s'); Discourse.Markdown.whiteListTag('span', 'class', 'excerpt'); Discourse.Markdown.whiteListIframe(/^(https?:)?\/\/www\.google\.com\/maps\/embed\?.+/i); +Discourse.Markdown.whiteListIframe(/^(https?:)?\/\/www\.openstreetmap\.org\/export\/embed.html\?.+/i); diff --git a/test/javascripts/lib/markdown-test.js.es6 b/test/javascripts/lib/markdown-test.js.es6 index 24e522dd8..45bc21523 100644 --- a/test/javascripts/lib/markdown-test.js.es6 +++ b/test/javascripts/lib/markdown-test.js.es6 @@ -423,6 +423,11 @@ test("sanitize", function() { cooked("", "", "it allows iframe to google maps"); + + cooked("", + "", + "it allows iframe to OpenStreetMap"); + equal(sanitize(""), "hullo"); equal(sanitize(""), "press me!"); equal(sanitize("draw me!"), "draw me!");