Ruby on Rails Saturday, January 23, 2016

I'm gonna summarise the question here, but the code and detailed situation is best described at StackOverFlow: 

http://stackoverflow.com/questions/34960077/post-patch-html-css-js-as-json-values-in-rails

I'm POSTing/PATCHing a JSON to a rails API endpoint with key-value pairs of HTML, CSS, JS and HEAD. 

The values contain raw html, raw css, raw js with special characters like %, @, &, ; that rails probably doesn't like. The parser is currently removing these special characters and it kind of screws up the data (whole html, whole css and also user generated javascript) by removing % & from in between.

Is there a way to let in incoming JSON as is, through the rails' JSON parser? 


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6c1873f1-19f4-4fef-890a-e951870bb8dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment