This 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
For example,
" http://www.google.co.uk/search?q=hello world "
becomes
"http://www.google.co.uk/search?q=hello%20world"
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.
svn path=/trunk/netsurf/; revision=4198
- utils/{url.c,url.h}(url_escape):
* added parameter 'toskip' to specify number of input characters which need to be skipped in the escape process. This avoids extra malloc buffer juggling.
* added parameter 'escexceptions' to specify the characters which need to be excluded from the escape process.
Solves SF tracker ID 1910169.
Note that when discname in path contains '/' characters (case: "file:///Sunfish#192.168.0.50::/home/joty.$/jo.html") or there is no discname specified at all (case "file:///HostFS:$/jo.htm"), you
need an UnixLib fix as in http://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2F&rev=3395&sc=1
svn path=/trunk/netsurf/; revision=4069
Optionally allow url_compare to ignore fragments in comparison
Fix handling of url_compare result in a few places
Fix redirects which contain fragments in the Location header
svn path=/trunk/netsurf/; revision=3826
Make url_path() return the full path (including the leafname).
Defaulted cookie path attributes have the leafname and trailing slash stripped.
Add testcase for defaulted path.
Fix testcase conditions for paths with leafnames.
svn path=/trunk/netsurf/; revision=3693
NetSurf includes are now done with ""s and other system includes with <>s as C intended.
The scandeps tool has been updated to only look for ""ed includes, and to verify that the
files exist in the tree before adding them to the dependency lines. The depend rule has
therefore been augmented to make sure the autogenerated files are built before it is run.
This is untested under self-hosted RISC OS builds. All else tested and works.
svn path=/trunk/netsurf/; revision=3307
Rewrite and simplify url_nice() to improve suggested filenames. Add option to keep extensions (no UI currently).
svn path=/import/netsurf/; revision=1814
- Convert Messages files to UTF-8 encoding.
- Replace local_encoding_name() with platform specific
utf8_[to,from]_local_encoding() functions - this allows mapping of 8bit
characters 0x80->0x9f (inclusive).
- All text that is rendered by the RISC OS Wimp is now converted to the system
local encoding prior to display.
- Lose the horrendous hack that was messages_get_key()
- Menu text is now translated to system local encoding on the fly (if necessary)
rather than at menu creation time. This allows the system alphabet to change
under us and our menus remain usable.
- The Languages menu now lists all languages that are present in the LangNames
file. In the case of selecting the UI language, those languages which are not
available are shaded.
svn path=/import/netsurf/; revision=1796
Improve clarity of use of utf8_to_enc.
Remove use of curl_escape - url_escape does similar things, just better.
svn path=/import/netsurf/; revision=1766
Fix bug in url_up_re which caused /xy/../ not to be recognised when xy was 2 characters. Add defines for match part numbers. Simplify part 6(g) of url_join().
svn path=/import/netsurf/; revision=1704
A somewhat better implementation of referrers which no longer sends the referer if the URL schemes don't match.
Things to do:
1) Preservation of referer across redirects (see comment in browser.c:284)
2) GUI templates/code for configuration of referer sending (simple on/off toggle only)
3) Make referer sending when fetching objects/stylesheets for a page pay attention to option_send_referer?
4) Handle the case where the referer is in the form of http://moo:foo@mysite.com/ (ie the login details embedded in the referer - not good).
svn path=/import/netsurf/; revision=1297
Rework the interface of the URL handing module to allow for multiple error types.
Modify save_complete URL rewriting appropriately.
svn path=/import/netsurf/; revision=1206