Closed retrofun closed 4 years ago
Does it work in Mister ? We use the same xml parser as far as I know.
Cannot say. I don't have a MiSTer.
An escape function is already there: html2str(). Would be a good idea to escape all XML string content.
e.g. this works for the name:
--- a/src/mra.c
+++ b/src/mra.c
@@ -282,6 +282,7 @@ void read_root(XMLNode *root, t_mra *mra) {
if (strncmp(node->tag, "name", 5) == 0) {
mra->name = strndup(node->text, 1024);
+ html2str(mra->name, mra->name);
} else if (strncmp(node->tag, "mratimestamp", 13) == 0) {
mra->mratimestamp = strndup(node->text, 1024);
} else if (strncmp(node->tag, "mameversion", 12) == 0) {
Yes, I was looking at it. But it doesn't get called for text nodes, only attributes. I wonder if it's a bug in sxmlc. Anyway, I'll fix it in sxmlc or elsewhere.
I'm working on this one, should be closed in a few minutes :)
https://github.com/jotego/jtbin/blob/master/mra/CPS1/Quiz%20%26%20Dragons%20%20Capcom%20Quiz%20Game%20-USA%20920701-.mra
contains
-> arc file: