Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

encodeURI problem #2

Open
andym2009 opened this issue Apr 15, 2015 · 4 comments
Open

encodeURI problem #2

andym2009 opened this issue Apr 15, 2015 · 4 comments

Comments

@andym2009
Copy link

I ran into difficulties with line 119 in MediaServerClient:
didl = decodeURI(didl);

It through a "malformed uri" exception. It was an exceptionally long response (over 96,000 characters) so I don't know where the problem was.

I tried decodeURIComponent and that also failed with the same result.

The only thing that worked was using unescape, which I know is deprecated, so not sure what the elegant solution should be.

@matt1
Copy link
Owner

matt1 commented Apr 25, 2015

Are you able to paste the long response into a github gist so I can try it? (assuming it has nothing sensitive in it)

@andym2009
Copy link
Author

I had shifted my attention to php and dlna, but if I can dig out what I was doing with crdlna I will try and provide it.

But, I think actually I think you have hit an area they have not yet really nailed in the standards. From what I can see of the dialogue around this topic, people are saying the decodeURI method is doing too much validation because it is focused on URI rather than simply decoding characters.

There is no control over what is likely to appear in the string, so I am guessing you'd end up reproducing what unescape used to do.

@matt1
Copy link
Owner

matt1 commented May 4, 2015

Ok - thanks for that. I'll leave this issue open for now until I either reproduce it with some test data or someone else stumbles on the same thing.

@andym2009
Copy link
Author

I temporarily added my email address to my public profile - I have the info, but it is largish so probably better if you email me and I'll send it via email :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants