diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-06-19 10:24:01 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-25 01:50:37 +0200 |
commit | 2c4595ad02ff35011c24ea71c193d5a9710bec30 (patch) | |
tree | a6eb3d3da97e2aafd3fff03de22b1d884bdd2d25 /src/qml/qml/qqmlcompiler.cpp | |
parent | 2753e9a795537df10c5a3b64ec9f6d8d81381837 (diff) |
Decode directory separators in source URLs
URLs with encoded directory-separator characters are not correctly
processed by QUrl.
Task-number: QTBUG-25981
Change-Id: I78173ef44c4850774b56753335bea34db04c0735
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlcompiler.cpp')
-rw-r--r-- | src/qml/qml/qqmlcompiler.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 2bb99ddbab..13ff9e81e3 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -515,6 +515,8 @@ void QQmlCompiler::genLiteralAssignment(QQmlScript::Property *prop, { Instruction::StoreUrl instr; QString string = v->value.asString(); + // Encoded dir-separators defeat QUrl processing - decode them first + string.replace(QLatin1String("%2f"), QLatin1String("/"), Qt::CaseInsensitive); QUrl u = string.isEmpty() ? QUrl() : output->url.resolved(QUrl(string)); instr.propertyIndex = prop->index; instr.value = output->indexForUrl(u); |