shithub: fork

Download patch

ref: 6bafe777c88b1418e74baf163b70026a4c1dcc9b
parent: 9de42d6c0a571502eefbe17970978b4bfe66a55c
author: qwx <qwx@sciops.net>
date: Fri Sep 26 05:14:47 EDT 2025

page: hack for epub: don't confuse it with an svg

--- a/sys/src/cmd/page.c
+++ b/sys/src/cmd/page.c
@@ -807,6 +807,8 @@
 		werrstr("unknown image format: %s", typ);
 		goto Err1;
 	}
+	if(strcmp(typ, "text/xml") == 0 && cistrcmp(file+strlen(file)-3, "svg") != 0)
+		i--;	/* bleh */
 	p->fd = fd;
 	p->data = tab[i].data;
 	p->open = tab[i].open;
--