mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-28 00:25:21 +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 (orig_href.charAt(0) == "/" && orig_href.charAt(1) != "/" && starts_with(href, wb_orig_origin)) {
|
||||||
//if (ends_with(href, "/")) {
|
href = href.substr(wb_orig_origin.length);
|
||||||
// href = href.substring(0, href.length - 1);
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
return href;
|
return href;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user