1
0
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:
Ilya Kreymer 2015-10-12 22:05:24 -07:00
parent 4c2e7b89b6
commit edbfd500a4

View File

@ -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;
}
}
}