Skip to content

Commit 8f61c41

Browse files
author
Cristy
committed
revert
1 parent 999a695 commit 8f61c41

1 file changed

Lines changed: 1 addition & 40 deletions

File tree

coders/svg.c

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -762,41 +762,6 @@ static double GetUserSpaceCoordinateValue(const SVGInfo *svg_info,int type,
762762
extern "C" {
763763
#endif
764764

765-
static MagickBooleanType SVGIsSupportedInlineImageFormat(const char *url)
766-
{
767-
const char
768-
prefix[] = "data:image/";
769-
770-
ssize_t
771-
i;
772-
773-
static const char
774-
*safe_formats[] =
775-
{
776-
"png",
777-
"jpeg",
778-
"jpg",
779-
"gif",
780-
"webp",
781-
"svg+xml",
782-
"x-icon",
783-
"vnd.microsoft.icon"
784-
};
785-
786-
if (url == (const char *) NULL)
787-
return(MagickFalse);
788-
if (strncmp(url,prefix,sizeof(prefix)-1) != 0)
789-
return(MagickFalse);
790-
for (i=0; i < (ssize_t) (sizeof(safe_formats)/sizeof(*safe_formats)); i++)
791-
{
792-
const char *mime = url+sizeof(prefix)-1;
793-
const char *format = safe_formats[i];
794-
if (strncmp(mime,format,strlen(format)) == 0)
795-
return(MagickTrue);
796-
}
797-
return(MagickFalse);
798-
}
799-
800765
static int SVGIsStandalone(void *context)
801766
{
802767
SVGInfo
@@ -2871,11 +2836,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
28712836
}
28722837
if (LocaleCompare(keyword,"xlink:href") == 0)
28732838
{
2874-
if (LocaleNCompare(value,"data:",5) != 0)
2875-
(void) CloneString(&svg_info->url,value);
2876-
else
2877-
if (SVGIsSupportedInlineImageFormat(value) != MagickFalse)
2878-
(void) CloneString(&svg_info->url,value);
2839+
(void) CloneString(&svg_info->url,value);
28792840
break;
28802841
}
28812842
if (LocaleCompare(keyword,"x1") == 0)

0 commit comments

Comments
 (0)