Javascript Cookie添加了%5C

时间:2018-07-06 00:09:03

标签: javascript cookies js-cookie

我将以下内容设置为cookie值:

%7B%22url%22%3Anull%2C%22landing_page%22%3A%22%2F%2Fwww.site.com%2FcookieTest.php%3Ftf_campaign%3Dgeneric_1402879093%26tf_source%3Dgoogle%26tf_medium%3Dpaid%26tf_content%3D54001912063_269225209373%26tf_term%3Dcrear%2520encuestas%2520online%26tf_dv%3Dc%26gclid%3DCjwKCAjwg_fZBRAoEiwAppvp-ZSUc6duu05XYtUl0ZdDAaULDtnpbAiwou-N7DDqagPsFZ4VTE56SBoCsVEQAvD_BwE%22%2C%22date%22%3A%222018-07-05%2018%3A29%3A25%22%7D

但是,当我查看存储的cookie中的值时,它却有所不同并显示以下内容:

%7B%22url%22%3Anull%2C%22landing_page%22%3A%22%2F%2Fwww.site.com%2FcookieTest.php%3Ftf_campaign%3Dgeneric_1402879093%26tf_source%3Dgoogle%26tf_medium%3Dpaid%26tf_content%3D54001912063_269225209373%26tf_term%3Dcrear%2520encuestas%2520online%26tf_dv%3Dc%26gclid%3DCjwKCAjwg_fZBRAoEiwAppvp-ZSUc6duu05XYtUl0ZdDAaULDtnpbAiwou-N7DDqagPsFZ4VTE56SBoCsVEQAvD_BwE%22%2C%22date%22%3A%222018-07-05%2018%3A29%3A25%22%7D

我可以这样做,以使Cookie值与第一个字符串完全相同,而不是第二个字符串吗?因此没有%5C

0 个答案:

没有答案