misc bug fixes: links without href; imgages without src

This commit is contained in:
alexadam 2016-09-05 12:13:20 +03:00
parent a9624b8df9
commit 523c314374
2 changed files with 24 additions and 5 deletions

View file

@ -67,6 +67,10 @@ function getHref(hrefTxt) {
if (!hrefTxt) {
return '';
}
hrefTxt = hrefTxt.trim();
if (hrefTxt === '') {
return '';
}
if (hrefTxt.indexOf('#') === 0) {
hrefTxt = window.location.href + hrefTxt;
}