Patch to be tolerant of whitespace in URLs
prb at ecs.soton.ac.uk
Sat May 24 12:33:23 BST 2008
The attached patch makes url_normalize take care of whitespace in a
fairly useful way, consistent with other browsers:
- Leading and trailing whitespace is trimmed
- Internal whitespace is urlescaped
" http://www.google.co.uk/search?q=hello world "
Explicit trailing whitespace, e.g. "...hello world%20", is left alone.
The upshot is that if you sloppily copy-paste a URL from IRC or whatnot
into the address bar, NetSurf no longer silently ignores you if you
caught some adjacent whitespace.
Apparently there are some badly-written websites out there in the wild
(who knew?) which don't escape their mid-URL whitespace properly,
either, so this should improve the chances of NetSurf working with them.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3086 bytes
Desc: not available
Url : http://vlists.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.org/attachments/20080524/c71c9a91/netsurf-url-whitespace3.bin
More information about the netsurf-dev