Why is my link munged? April 17, 2002 4:41 PM Subscribe
I tried to build a (hideous but real) link and it kept getting munged.
link:
http://nl3.newsbank.com/nl-search/we/Archives?p_product=WP&p_theme=wpost&p_action=search&p_maxdocs=200&s_dispstring=allfields(virginia)%20and%20allfields(australia)%20and%20allfields(lottery)%20AND%20date(1992)&p_field_date-0=YMD_date&p_params_date-0=date:B,E&p_text_date-0=1992&p_field_advanced-0=&p_text_advanced-0=("virginia")%20and%20("australia")%20and%20("lottery")&p_perpage=10&p_sort=YMD_date:D&xcal_useweights=no
Intended for the second link in this comment.
posted by NortonDC at 4:44 PM on April 17, 2002
http://nl3.newsbank.com/nl-search/we/Archives?p_product=WP&p_theme=wpost&p_action=search&p_maxdocs=200&s_dispstring=allfields(virginia)%20and%20allfields(australia)%20and%20allfields(lottery)%20AND%20date(1992)&p_field_date-0=YMD_date&p_params_date-0=date:B,E&p_text_date-0=1992&p_field_advanced-0=&p_text_advanced-0=("virginia")%20and%20("australia")%20and%20("lottery")&p_perpage=10&p_sort=YMD_date:D&xcal_useweights=no
Intended for the second link in this comment.
posted by NortonDC at 4:44 PM on April 17, 2002
NortonDC, I think it's the double quotation marks {"virginia", "australia", and "lottery") that are screwing up your link.
Here is the link with double quotes replaced by singles, which seems to work.
posted by mr_crash_davis at 4:48 PM on April 17, 2002
Here is the link with double quotes replaced by singles, which seems to work.
posted by mr_crash_davis at 4:48 PM on April 17, 2002
Yeah, that did it.
So, are their characters that are legal in a URL that are illegal in an href?
posted by NortonDC at 5:00 PM on April 17, 2002
So, are their characters that are legal in a URL that are illegal in an href?
posted by NortonDC at 5:00 PM on April 17, 2002
Those characters are legal, but for some reason Matt might filter for them in URL's. You can also replace them with an HTML character code (I know %20 is equal to a space, but I forget what it is for ").
-SJ
posted by SweetJesus at 5:11 PM on April 17, 2002
-SJ
posted by SweetJesus at 5:11 PM on April 17, 2002
Yep, you'll want to escape them (%HH, HH is the hex value of the character, I don't recall that for double quote off the top of my head) in the URL - " is a special character in HTML and the browser will end the URL there. The server should be happy to unescape the %HH for the client and fetch the document as if it was a real ".
posted by azazello at 5:12 PM on April 17, 2002
posted by azazello at 5:12 PM on April 17, 2002
It looks like the code to make a link does something like <a href="URL">LINK TEXT</a>, in which case trying to make a link to quoted "text". would give you <a href="quoted " text"."> (bolded between start and end quotes).
Either Matt can escape quotes within the URL, you can replace the quotes with single quotes, or you can escape the quotes manually via %22 as described.
posted by jaek at 6:04 PM on April 17, 2002
Either Matt can escape quotes within the URL, you can replace the quotes with single quotes, or you can escape the quotes manually via %22 as described.
posted by jaek at 6:04 PM on April 17, 2002
I clicked on this thread to figure out what "munged" means . . . ah, is this it? Those BASIC classes in the early 80s just didn't cover this stuff. (But I bet I can still make the computer draw a tree!)
posted by JanetLand at 6:49 AM on April 18, 2002
posted by JanetLand at 6:49 AM on April 18, 2002
I clicked on this thread to figure out what "munged" means . . . ah, is this it?
No, this.
posted by iceberg273 at 7:27 AM on April 18, 2002
No, this.
posted by iceberg273 at 7:27 AM on April 18, 2002
You are not logged in, either login or create an account to post comments
posted by mr_crash_davis at 4:43 PM on April 17, 2002