From bbe6c5a5e20b95eff80881cee1277a0e259cbcd4 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 2 Jun 2010 08:18:47 +0000 Subject: we need to escape more chars now, so fix that. test skins with this update parse correctly with the themeditor :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26468 a1c6a512-1295-4272-9138-f99709370657 --- utils/skinupdater/skinupdater.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/skinupdater/skinupdater.c b/utils/skinupdater/skinupdater.c index 7e3d14e237..537c53ffbd 100644 --- a/utils/skinupdater/skinupdater.c +++ b/utils/skinupdater/skinupdater.c @@ -36,8 +36,6 @@ bool is_mono_display = false; bool use_new_vp_tags = true; - - /* dump "count" args to output replacing '|' with ',' except after the last count. * return the amount of chars read. (start+return will be after the last | ) */ @@ -56,6 +54,10 @@ int dump_arg(FILE* out, const char* start, int count, bool close) } count--; } else { + if (find_escape_character(start[l])) + { + PUTCH(out, '%'); + } PUTCH(out, start[l]); } l++; @@ -264,6 +266,9 @@ top: case '>': case ';': case '#': + case ')': + case '(': + case ',': PUTCH(out, *in++); goto top; break; @@ -291,6 +296,14 @@ top: level--; PUTCH(out, *in++); } + else if (*in == '|') + { + if (level == 0) + { + PUTCH(out, '%'); + } + PUTCH(out, *in++); + } else if (*in == '#') { while (*in && *in != '\n') @@ -300,6 +313,10 @@ top: } else { + if (find_escape_character(*in)) + { + PUTCH(out, '%'); + } PUTCH(out, *in++); } } -- cgit