VentureCraft / revisionable

Easily create a revision history for any laravel model
http://twitter.com/duellsy
MIT License
2.55k stars 348 forks source link

Stop JSON data new_value being saved with slashes #404

Open thetwopct opened 3 years ago

thetwopct commented 3 years ago

I'm keeping track of a JSON array, and I noticed the new_value was being saved with slashes. This was then being output on the frontend.

2021-09-30-102627

I started messing with running new_value through a custom stripslashes function in blade files but seemed easier to just amend the package.

I used stripslashes on new_value in postSave() and it solves the problem. We've been running this for a while and haven't see anything else have issues because of this change.

2021-09-30-102920