Actually correctly escape output

This commit is contained in:
zvon 2021-05-03 13:57:13 +02:00
parent e785ca5448
commit cbd45bfce8

View File

@ -28,6 +28,7 @@ public:
}
void setName(const std::string &name) {
_name = name;
replaceStr(_name, "\"", "\\\"");
}
void setPrice(int price) {
_price = price;
@ -37,6 +38,7 @@ public:
}
void setDesc(const std::string &desc) {
_desc = desc;
replaceStr(_desc, "\"", "\\\"");
}
std::string jsonify() const;
private: