开发者

Jquery HtmlEncode data to cookie

开发者 https://www.devze.com 2023-03-26 16:36 出处:网络
I am using the jQuery cookieplugin, and want to save the values from a CKEditor into a cookie, to be able to make a draftfunction, a bit similar t开发者_如何学运维o the one on StackOverflow.

I am using the jQuery cookieplugin, and want to save the values from a CKEditor into a cookie, to be able to make a draftfunction, a bit similar t开发者_如何学运维o the one on StackOverflow.

The CKEditors content can contain html, so is there a way to htmlencode the HTML-data with jQuery, so it can be passed to a cookie?


Use encodeURIComponent() and decodeURIComponent()

0

精彩评论

暂无评论...
验证码 换一张
取 消