I want to create a cookie with:
- Name: drm
- Value: drmStatus=Expected
I'm using the code from the answer to this question - Jquery Cookie plugin - multiple values? to create the cookie
var obj = { drmStatus: 'Expected' };
$.cookie('drm', $.param(obj), { path: '/', raw: true })
However this generates a cookie with
- Name: drm
- Value: drmStatus%3DExpected
The reason for this is this snippet from https://github.com/carhartl/jquery-cookie/blob/master/jquery.cookie.js
config.raw ? value : encodeURIComponent(value)
This is using the value of "raw" from the config object to decide whether to encode the value. It appears to be ignoring the value of "raw" value passed in the options object.
So my question is, can I set the option raw: true when using jquery.cookie?