i have some issue with a json stored in mysql TEXT field, the thing is that everything is OK until i use ' (single quote) the json then is saved \' and every time i save it back it appends a slash like: \' \\' \\' etc.then some characters are not encoded correctly \u00e0
<div class="wpbs-calendar-legend" data-info="{"default":{"name":{"default":"Available","hr":"Slobodno","cs":"Volno","da":"Ledigt","nl":"Vrij","en":"Available","fr":"Libre","de":"Frei","hu":"Szabad","it":"Libero","ro":"Disponobil","ru":"\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e","sk":"Vo\u013en\u00fd","es":"Libre","sv":"Ledigt","uk":"B\u0456\u043b\u044c\u043d\u043e","no":""},"color":"#f1ffcc","splitColor":false,"bookable":"yes","auto-pending":"no","sync":"no"},"1":{"name":{"default":"Booked","hr":"Zauzeto","cs":"Obsazeno","da":"Booket","nl":"Bezet","en":"Booked","fr":"Occup\u00e9","de":"Belegt","hu":"Foglalt","it":"Prenotato","ro":"Rezervat","ru":"\u0417\u0430\u043d\u044f\u0442\u043e","sk":"Obsaden\u00fd","es":"Reservado","sv":"Bokat","uk":"\u0417\u0430\u0439\u043d\u044f\u0442\u043e","no":""},"color":"#ff524c","splitColor":false,"bookable":false,"auto-pending":"yes","sync":"yes"},"2":{"name":{"en":">14H","nl":"","et":"","fi":"","fr":"D\u00e8s 14H","de":"","pt":"","ro":"","default":"D\u00e8s 14H"},"color":"#f1ffcc","splitColor":"#ff524c","bookable":"yes","hide":false,"auto-pending":"no","sync":"no"},"3":{"name":{"en":"<12H","nl":"","et":"","fi":"","fr":"Jusqu\\" \u00e0="" 10h","de":"","pt":"","ro":"","default":"jusqu\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\u00e0="" 10h"},"color":"#ff524c","splitcolor":"#f1ffcc","bookable":"yes","hide":false,"auto-pending":"no","sync":"no"}}'=""></div>
and in my insepct window looks like this:
I am using WordPress so this json_encoded string is saved using update_option into the database.