File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ def ascii?(mime)
56
56
# Special case for application/javascript.
57
57
# This needs because mime-types tells us application/javascript a non-text type.
58
58
true
59
+ when "image/svg+xml"
60
+ # mime-types tells us image/svg+xml a non-text type.
61
+ true
59
62
else
60
63
MIME ::Type . new ( mime ) . ascii?
61
64
end
Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ class IRubyTest::MimeTest < IRubyTest::TestBase
19
19
assert_equal ( data ,
20
20
res [ "application/javascript" ] )
21
21
end
22
+
23
+ test ( "image/svg+xml" ) do
24
+ data = '<svg height="30" width="100"><text x="0" y="15" fill="red">SVG</text></svg>'
25
+ res = IRuby ::Display . display ( data , mime : "image/svg+xml" )
26
+ assert_equal ( data ,
27
+ res [ "image/svg+xml" ] )
28
+ end
22
29
end
23
30
end
24
31
end
You can’t perform that action at this time.
0 commit comments