mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 05:27:00 +03:00
[project @ 2004-08-06 22:20:36 by jmb]
Make the likes of <a href="#foo"> work svn path=/import/netsurf/; revision=1188
This commit is contained in:
parent
09afabf63c
commit
f68d4491be
10
utils/url.c
10
utils/url.c
@ -240,6 +240,12 @@ char *url_join(const char *rel, const char *base)
|
||||
}
|
||||
|
||||
/* 2) */
|
||||
/* base + "#s" = (current document)#s (see Appendix C.1) */
|
||||
/** \todo does (current document) include the query? */
|
||||
if (rel_match[9].rm_so != -1) {
|
||||
fragment = rel + rel_match[9].rm_so;
|
||||
fragment_len = rel_match[9].rm_eo - rel_match[9].rm_so;
|
||||
}
|
||||
if (rel_match[5].rm_so == rel_match[5].rm_eo &&
|
||||
rel_match[2].rm_so == -1 &&
|
||||
rel_match[4].rm_so == -1 &&
|
||||
@ -250,10 +256,6 @@ char *url_join(const char *rel, const char *base)
|
||||
query = rel + rel_match[7].rm_so;
|
||||
query_len = rel_match[7].rm_eo - rel_match[7].rm_so;
|
||||
}
|
||||
if (rel_match[9].rm_so != -1) {
|
||||
fragment = rel + rel_match[9].rm_so;
|
||||
fragment_len = rel_match[9].rm_eo - rel_match[9].rm_so;
|
||||
}
|
||||
|
||||
/* 3) */
|
||||
if (rel_match[2].rm_so != -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user