summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-02 05:55:41 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-02 05:55:41 +0000
commitf16adb045a25bf6f7ac29a2f6c80b25f1a3d2613 (patch)
tree8569703b2f5e5ad631e9e3422f983857a31ac440 /utils
parent9381b49b04510376ad643a78ce1fdd78165457cd (diff)
downloadrockbox-f16adb045a25bf6f7ac29a2f6c80b25f1a3d2613.tar.gz
rockbox-f16adb045a25bf6f7ac29a2f6c80b25f1a3d2613.tar.bz2
rockbox-f16adb045a25bf6f7ac29a2f6c80b25f1a3d2613.zip
Theme Editor: Fixed code generation with escaped characters
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26462 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils')
-rw-r--r--utils/themeeditor/parsetreenode.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/utils/themeeditor/parsetreenode.cpp b/utils/themeeditor/parsetreenode.cpp
index 41cdf3ca24..b283e13038 100644
--- a/utils/themeeditor/parsetreenode.cpp
+++ b/utils/themeeditor/parsetreenode.cpp
@@ -101,9 +101,9 @@ QString ParseTreeNode::genCode() const
for(int i = 0; i < children.count(); i++)
{
/*
- Adding a % in case of tag, because the tag rendering code
- doesn't insert its own
- */
+ Adding a % in case of tag, because the tag rendering code
+ doesn't insert its own
+ */
if(children[i]->element->type == TAG)
buffer.append(TAGSYM);
buffer.append(children[i]->genCode());
@@ -161,7 +161,12 @@ QString ParseTreeNode::genCode() const
break;
case TEXT:
- buffer.append(element->text);
+ for(char* cursor = element->text; *cursor; cursor++)
+ {
+ if(find_escape_character(*cursor))
+ buffer.append(TAGSYM);
+ buffer.append(*cursor);
+ }
break;
case COMMENT:
@@ -176,7 +181,12 @@ QString ParseTreeNode::genCode() const
switch(param->type)
{
case skin_tag_parameter::STRING:
- buffer.append(param->data.text);
+ for(char* cursor = param->data.text; *cursor; cursor++)
+ {
+ if(find_escape_character(*cursor))
+ buffer.append(TAGSYM);
+ buffer.append(*cursor);
+ }
break;
case skin_tag_parameter::NUMERIC: