shinjixxxxx / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

'new goog.Uri' throws exceptions on certain types of URIs #566

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Most types of malformed URIs are handled incorrectly, but this one throws an 
exception:
  var uri = new goog.Uri(
    'http://www.cpdee.ufmg.br/~elt/docs/DSP/Microsoft%20PowerPoint%20-%20Aula_01_Aritm%E9tica.pdf')
decodeURIComponent blows up trying to decode it.

Original issue reported on code.google.com by Nicholas.J.Santos on 11 Jun 2013 at 9:14

GoogleCodeExporter commented 8 years ago
More concretely decodeURIComponent('%E9') throws.

    escape('é') -> "%E9"
    encodeURIComponent('é') -> "%C3%A9"

Original comment by dan.pup...@gmail.com on 11 Jun 2013 at 10:34