Saving Text with JavaScript

Hello!

My app is currently saving text that is written only on the first line. How can I make it save text on the second and all the other lines?

You only need to encode the text to save, change this line:

document.cookie = encodeURIComponent(cname) + "=" + cvalue + ";" + expires;

with:

document.cookie = encodeURIComponent(cname) + "=" + encodeURIComponent(cvalue) + ";" + expires;

=)

1 Like

Thank you very much! =)