File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class Parser
3838 * offset #2 Parameters
3939 * offset #3 Datas
4040 */
41- const DATA_URI_REGEXP = '/data:([a-zA-Z-\/]+)([a-zA-Z0-9-_;=.+]+)?,(.*)/ ' ;
41+ const DATA_URI_REGEXP = '/data:([a-zA-Z-\/+ ]+)([a-zA-Z0-9-_;=.+]+)?,(.*)/ ' ;
4242
4343 /**
4444 * Parse a data URI and return a DataUri\Data
Original file line number Diff line number Diff line change @@ -58,7 +58,10 @@ public function testParse()
5858 $ this ->assertFalse ($ dataURI ->isBinaryData ());
5959 $ this ->assertEquals ('#$% ' , $ dataURI ->getData ());
6060 $ this ->assertEquals (1 , count ($ dataURI ->getParameters ()));
61- }
61+
62+ $ dataURI = DataURI \Parser::parse ($ tests [4 ]);
63+ $ this ->assertEquals ('image/svg+xml ' , $ dataURI ->getMimeType ());
64+ }
6265
6366 /**
6467 * @expectedException \DataURI\Exception\InvalidDataException
You can’t perform that action at this time.
0 commit comments