Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window.escape compatible encoder #14281

Open
jbdeboer opened this issue Oct 21, 2013 · 3 comments
Open

Window.escape compatible encoder #14281

jbdeboer opened this issue Oct 21, 2013 · 3 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. core-n library-convert type-enhancement A request for a change that isn't a bug

Comments

@jbdeboer
Copy link

In AngularJS, we use window.escape to escape our cookie values:

From MDN, "
Encodes a string, replacing all characters except for ASCII digits, lower and upper case letters, and the characters * + - . / @­ _ with a hexadecimal escape sequence.
"

There should be an equivalent function in Dart so that we can share cookies between Dart and Javascript.

Note, there are other functions in Dart that "percent-encode", but since we have a limited number of bytes to store cookies, we can not be over-zealous in what we escape.

@madsager
Copy link
Contributor

Added Area-Library, Triaged labels.

@lrhn
Copy link
Member

lrhn commented Apr 25, 2014

Added Library-Convert label.

@lrhn
Copy link
Member

lrhn commented Aug 7, 2014

The closest things in Dart are Uri.encodeFull and Uri.encodeComponent, but they don't omit the same characters, and they don't use %uxxxx encoding for >8-bit characters.

Would it be possible to use Uri.encodeComponent in Dart and encodeUriComponent in JS?


Removed Type-Defect label.
Added Type-Enhancement label.

@jbdeboer jbdeboer added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-convert labels Aug 7, 2014
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed priority-unassigned labels Feb 29, 2016
@lrhn lrhn added the core-m label Aug 11, 2017
@floitschG floitschG added core-n and removed core-m labels Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. core-n library-convert type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants