Fix invalid compression in qmlmin
authorLars Knoll <lars.knoll@digia.com>
Tue, 11 Dec 2012 21:24:29 +0000 (22:24 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 11 Dec 2012 13:50:32 +0000 (14:50 +0100)
qmlmin could compress identifiers in an invalid way if
it contained special chars that would get expanded to
unicode escape sequences

Change-Id: I35b3ba01f68b69b34c4cd19616afb8b4b4cd6fa3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
tools/qmlmin/main.cpp

index 0d69503..9500c45 100644 (file)
@@ -352,13 +352,7 @@ bool Minify::parse(int startToken)
                 if (isIdentChar(lastChar))
                     assembled += QLatin1Char(' ');
 
-                foreach (const QChar &ch, identifier) {
-                    if (isIdentChar(ch))
-                        assembled += ch;
-                    else {
-                        escape(ch, &assembled);
-                    }
-                }
+                assembled += identifier;
 
             } else if (yytoken == T_STRING_LITERAL || yytoken == T_MULTILINE_STRING_LITERAL) {
                 assembled += QLatin1Char('"');