Helper methods for using URI.js against servers not understanding UTF-8 encoded URIs#10
Helper methods for using URI.js against servers not understanding UTF-8 encoded URIs#10rodneyrehm merged 1 commit intomedialize:gh-pagesfrom mortenn:gh-pages
Conversation
|
wouldn't it also be nice to be able to |
|
I suppose so, yes, but this patch was written with the intent of using URI.js to enhance older applications, where everything will be ISO and adding doing .iso8859() to each url on such a system would be counterproductive. The main concern with enabling URI().iso8859().unicode()... is the age old problem of applying the wrong thing in the wrong order, or to the wrong thing. I would certainly not mind that syntax, but I do not think I will implement that. |
|
Another thing; new URI('...%E6...') makes IE8 error because %E6 is not valid unicode - this patch should fix that case as well, provided one has called URI.iso8859(). |
Helper methods for using URI.js against servers not understanding UTF-8 encoded URIs
…10, mortenn) adding .iso8859() and .unicode() to convert an URI's escape encoding
|
included in URI.js v1.4.0 |
|
Thanks! |
Hello,
This patch adds two new static functions - URI.iso8859 and URI.unicode - that replace the URI.encode and URI.decode refs with the old escape/unescape functions - and restores the default.
I have also modified the en/de-codeQuery methods to reference URI.en/de-code in order for the switching of modes to have the least possible impact (and avoiding redefining the methods).
I have also added the two new static methods to the documentation.
// Cheers, Morten