1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

wobmat rewrite: support "a.href = '.'" properly even if trailing / missing

This commit is contained in:
Ilya Kreymer 2015-09-10 17:18:30 -07:00
parent 08849a573b
commit c96082cf83

View File

@ -447,6 +447,12 @@ var wombat_internal = function($wbwindow) {
this._parser = make_parser(href);
}
//Special case for href="." assignment
if (prop == "href" && typeof(value) == "string" && value[0] == ".") {
this._parser.href = $wbwindow.document.baseURI;
value = this._parser.href;
}
try {
this._parser[prop] = value;
} catch (e) {