mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +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
|
//Special case for href="." assignment
|
||||||
if (prop == "href" && typeof(value) == "string") {
|
if (prop == "href" && typeof(value) == "string") {
|
||||||
if (value[0] == ".") {
|
if (value) {
|
||||||
value = resolve_rel_url(value);
|
if (value[0] == ".") {
|
||||||
} else if (value[0] == "/") {
|
value = resolve_rel_url(value);
|
||||||
value = WB_wombat_location.origin + 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