mirror of
https://github.com/alexadam/save-as-ebook.git
synced 2025-09-11 09:54:41 +00:00
fix & & problem in title; Issue #10
This commit is contained in:
parent
1bfaa75c12
commit
eefc97bdfb
3 changed files with 22 additions and 8 deletions
|
@ -167,8 +167,7 @@ function getAbsoluteUrl(urlStr) {
|
|||
} else if (urlStr.indexOf('http') !== 0) {
|
||||
absoluteUrl = currentUrl + '/' + urlStr;
|
||||
}
|
||||
absoluteUrl = absoluteUrl.replace(/&/ig, '&');
|
||||
absoluteUrl = absoluteUrl.replace(/&/ig, '&');
|
||||
absoluteUrl = escapeAmp(absoluteUrl);
|
||||
return absoluteUrl;
|
||||
} catch (e) {
|
||||
console.log('Error:', e);
|
||||
|
@ -291,3 +290,14 @@ function generateRandomTag(tagLen) {
|
|||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
function escapeAmp(text) {
|
||||
var newText = text.replace(/&/ig, '&');
|
||||
newText = newText.replace(/&/ig, '&');
|
||||
return newText;
|
||||
}
|
||||
|
||||
function getEbookFileName(name) {
|
||||
var newName = name.replace(/&/ig, '&');
|
||||
return newName;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue