Problems where Target URL's contain "&"
![]() ![]() |
I'm seeing that any TinyURL's where the _target_ URL has an "&" internally get decoded incorrectly. Since you're using XMLHttpRequest, any "&"'s in the target URL are encoded as "&" in the XML data since XML encodes "&" chars. As a quick fix, I added the following at the end of extract_from_response(), to translate "&" back to "&":
... theUrl = theUrl.replace(/&/g, '&'); // *ted 7/17/09 & -> & return theUrl; } Example:
|
![]() ![]() |
Rats, didn't HTML-encode all of the above correctly. The comment in the code-block above is correct, the the text in the reg-ex didn't get encoded correctly. Just to clarify:
"&"+"amp;" -> "&" |
![]() ![]() |
Hi Tony Duckles, Thank you for your report.
See you. |
![]() ![]() |
Hi,
Cheers, |
![]() ![]() |
P.S. I think the following should possibly fix the problem:
|
![]() ![]() |
The quotes were missing. The following does the job for the link posted by MAEDA Atusi finalUrl.replace(/\\|\\/, '').replace('&/g', '&'); |


