mirror of
https://github.com/alexadam/save-as-ebook.git
synced 2025-09-10 09:24:49 +00:00
misc bug fixes
This commit is contained in:
parent
4d14fd5baf
commit
d3ea23f3bf
7 changed files with 126 additions and 321 deletions
|
@ -269,7 +269,7 @@ function getBase64ImgData(srcTxt) {
|
|||
|
||||
function getXPath(elm) {
|
||||
if (!elm) return ''
|
||||
|
||||
|
||||
var allNodes = document.getElementsByTagName('*');
|
||||
for (var segs = []; elm && elm.nodeType === 1; elm = elm.parentNode) {
|
||||
if (elm.hasAttribute('id')) {
|
||||
|
@ -318,6 +318,11 @@ function generateRandomTag(tagLen) {
|
|||
return text;
|
||||
}
|
||||
|
||||
function removeSpecialChars(text) {
|
||||
// FIXME remove white spaces ?
|
||||
return text.replace(/\//g, '-')
|
||||
}
|
||||
|
||||
function escapeXMLChars(text) {
|
||||
return text.replace(/&/g, '&')
|
||||
.replace(/>/g, '>')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue