@@ -24,6 +24,18 @@ describe("Markdown component", function() {
2424 const el = render ( < Markdown source = { str } /> )
2525 expect ( el . html ( ) ) . toEqual ( `<div class="markdown"><p><img src="http://image.source" title="Image title"></p>\n</div>` )
2626 } )
27+
28+ it ( "allows image elements with https scheme" , function ( ) {
29+ const str = ``
30+ const el = render ( < Markdown source = { str } /> )
31+ expect ( el . html ( ) ) . toEqual ( `<div class="markdown"><p><img src="https://image.source" title="Image title"></p>\n</div>` )
32+ } )
33+
34+ it ( "allows image elements with data scheme" , function ( ) {
35+ const str = `<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==">`
36+ const el = render ( < Markdown source = { str } /> )
37+ expect ( el . html ( ) ) . toEqual ( `<div class="markdown"><p>` + str + `</p>\n</div>` )
38+ } )
2739
2840 it ( "allows heading elements" , function ( ) {
2941 const str = `
@@ -51,6 +63,18 @@ describe("Markdown component", function() {
5163 expect ( el . html ( ) ) . toEqual ( `<div class="renderedMarkdown"><div><p><img src="http://image.source" title="Image title"></p></div></div>` )
5264 } )
5365
66+ it ( "allows image elements with https scheme" , function ( ) {
67+ const str = ``
68+ const el = render ( < OAS3Markdown source = { str } /> )
69+ expect ( el . html ( ) ) . toEqual ( `<div class="renderedMarkdown"><div><p><img src="https://image.source" title="Image title"></p></div></div>` )
70+ } )
71+
72+ it ( "allows image elements with data scheme" , function ( ) {
73+ const str = `<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==">`
74+ const el = render ( < OAS3Markdown source = { str } /> )
75+ expect ( el . html ( ) ) . toEqual ( `<div class="renderedMarkdown"><div>` + str + `</div></div>` )
76+ } )
77+
5478 it ( "allows heading elements" , function ( ) {
5579 const str = `
5680# h1
0 commit comments