mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
wombat: fix rel '/' rewrite which incorrectly handles rel scheme '//' urls
This commit is contained in:
parent
4c2e7b89b6
commit
edbfd500a4
@ -479,10 +479,12 @@ var wombat_internal = function($wbwindow) {
|
||||
|
||||
//Special case for href="." assignment
|
||||
if (prop == "href" && typeof(value) == "string") {
|
||||
if (value[0] == ".") {
|
||||
value = resolve_rel_url(value);
|
||||
} else if (value[0] == "/") {
|
||||
value = WB_wombat_location.origin + value;
|
||||
if (value) {
|
||||
if (value[0] == ".") {
|
||||
value = resolve_rel_url(value);
|
||||
} else if (value[0] == "/" && (value.length <= 1 || value[1] != "/")) {
|
||||
value = WB_wombat_location.origin + value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user