mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
wombat unrewrite: if given a host-relative url (starting with '/') to extract_orig(), extract as host-relative as well if the host matches the current origin -- maintain host-relative urls when possible
This commit is contained in:
parent
950c31737c
commit
e97d2fb517
@ -359,10 +359,9 @@ var wombat_internal = function($wbwindow) {
|
||||
}
|
||||
}
|
||||
|
||||
// remove trailing slash
|
||||
//if (ends_with(href, "/")) {
|
||||
// href = href.substring(0, href.length - 1);
|
||||
//}
|
||||
if (orig_href.charAt(0) == "/" && orig_href.charAt(1) != "/" && starts_with(href, wb_orig_origin)) {
|
||||
href = href.substr(wb_orig_origin.length);
|
||||
}
|
||||
|
||||
return href;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user