src/hbcore/utils/hbtextmeasurementutility_p.cpp
changeset 3 11d3954df52a
parent 2 06ff229162e9
child 5 627c4a0fd0e7
--- a/src/hbcore/utils/hbtextmeasurementutility_p.cpp	Fri May 14 16:09:54 2010 +0300
+++ b/src/hbcore/utils/hbtextmeasurementutility_p.cpp	Thu May 27 13:10:59 2010 +0300
@@ -383,7 +383,14 @@
         dir.mkpath(filePath);
     }
 
-    filePath.append(domainName);
+    // Make sure there are no illegal characters in "domainName"
+    QString tempName = domainName;
+    tempName.remove(QRegExp("[^a-zA-Z0-9]"));
+    if (tempName.isEmpty()) {
+        tempName = "unknown";
+    }
+
+    filePath.append(tempName);
     filePath.append('_');
     filePath.append(profile.name());
     filePath.append('_');