Actually correctly escape output
This commit is contained in:
parent
e785ca5448
commit
cbd45bfce8
2
meal.hpp
2
meal.hpp
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user