Disallow % from asset names as it seems to awake some XML character-encoding
authorCarl Hetherington <cth@carlh.net>
Thu, 7 Sep 2023 21:22:54 +0000 (23:22 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 7 Sep 2023 21:23:13 +0000 (23:23 +0200)
demons.

src/lib/util.cc

index 13a062bc63e5d8c35bf16efbede63abacb7ea648..6339cb6a64b24afaa6b79e029e51a5436fe750bb 100644 (file)
@@ -799,7 +799,7 @@ careful_string_filter (string s)
 
        /* Then remove anything that's not in a very limited character set */
        wstring out;
-       wstring const allowed = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_%.+";
+       wstring const allowed = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.+";
        for (int i = 0; i < transliterated_more.length(); ++i) {
                wchar_t c = transliterated_more[i];
                if (allowed.find(c) != string::npos) {