...but parsing this with URI throws an exception claiming that this
is
invalid.
I don’t know exactly what URI’s are but Mechanize is using it to
parse
URLs and this appears to be a valid URL so it looks like either
Mechanize’s
bug is in using Ruby’s URI module or the URI module in not accepting
valid
URLs. Either that or there’s something I’m totally not understanding
(like
my browser lying to me or something). Can someone tell me what’s going
on?
Thank you!
On Thu, Aug 14, 2008 at 1:12 PM, Just Another Victim of the Ambient
Morality [email protected] wrote:
bug is in using Ruby’s URI module or the URI module in not accepting valid
URLs. Either that or there’s something I’m totally not understanding (like
my browser lying to me or something). Can someone tell me what’s going on?
Thank you!
While it’s unfortunate for us coders, not properly escaped hrefs in
links are a very common thing on the web, fortunately there are not
that many URIs that use special characters, and sometimes people
actually do escape them before slating them into HTML, but not always.
There’s no simple workaround i can think of, short of patching uri.rb
Other characters are excluded because gateways and other transport
agents are known to sometimes modify such characters, or they are
used as delimiters.
unwise = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`"
Data corresponding to excluded characters must be escaped in order