Thanks to Ponce I have discovered and fixed a bug

Hopefully
This commit is contained in:
ArsenArsen 2017-06-06 21:26:46 +02:00
parent aa0764aac5
commit dbc8063f66

View File

@ -171,7 +171,7 @@ QJsonObject recurseAndReplace(QJsonObject &body, QByteArray &data, QString conte
} else if (v.isString()) { } else if (v.isString()) {
QString str = v.toString(); QString str = v.toString();
if (str.startsWith("/") && str.endsWith("/")) { if (str.startsWith("/") && str.endsWith("/")) {
o.insert(s, str.replace("%image", data).replace("%contenttype", contentType)); o.insert(s, str.mid(1, str.length() - 2).replace("%image", data).replace("%contenttype", contentType));
} else } else
o.insert(s, v); o.insert(s, v);
} else } else