Skip to content

Commit

Permalink
wobmat rewrite: support "a.href = '.'" properly even if trailing / mi…
Browse files Browse the repository at this point in the history
…ssing
  • Loading branch information
ikreymer committed Sep 11, 2015
1 parent 08849a5 commit c96082c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pywb/static/wombat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c96082c

Please sign in to comment.