mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
fix #3993
This commit is contained in:
parent
f6ce49b586
commit
276de8a470
2
public/v1/js/app_vue.js
vendored
2
public/v1/js/app_vue.js
vendored
File diff suppressed because one or more lines are too long
2
public/v1/js/create_transaction.js
vendored
2
public/v1/js/create_transaction.js
vendored
File diff suppressed because one or more lines are too long
2
public/v1/js/edit_transaction.js
vendored
2
public/v1/js/edit_transaction.js
vendored
File diff suppressed because one or more lines are too long
8
public/v1/js/ff/firefly.js
vendored
8
public/v1/js/ff/firefly.js
vendored
@ -144,6 +144,11 @@ function listLengthInitial() {
|
||||
$('.listLengthTrigger').unbind('click').click(triggerList)
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param e
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function triggerList(e) {
|
||||
"use strict";
|
||||
var link = $(e.target);
|
||||
@ -153,12 +158,13 @@ function triggerList(e) {
|
||||
table.find('.overListLength').hide();
|
||||
table.attr('data-hidden', 'yes');
|
||||
link.text(showFullList);
|
||||
return false;
|
||||
}
|
||||
if (table.attr('data-hidden') !== 'no') {
|
||||
// show all, return false
|
||||
table.find('.overListLength').show();
|
||||
table.attr('data-hidden', 'no');
|
||||
link.text(showOnlyTop);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
@ -124,10 +124,6 @@ export default {
|
||||
types = this.defaultAccountTypeFilters.join(',');
|
||||
}
|
||||
this.updateACURI(types);
|
||||
},
|
||||
name() {
|
||||
// console.log('Watch: name()');
|
||||
// console.log(this.name);
|
||||
}
|
||||
},
|
||||
methods:
|
||||
@ -141,7 +137,7 @@ export default {
|
||||
for (const key in res.data) {
|
||||
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
||||
current = res.data[key];
|
||||
current.description = this.escapeHtml(res.data[key].description)
|
||||
current.name_with_balance = this.escapeHtml(res.data[key].name_with_balance)
|
||||
escapedData.push(current);
|
||||
}
|
||||
}
|
||||
@ -151,6 +147,25 @@ export default {
|
||||
// any error handler
|
||||
})
|
||||
},
|
||||
escapeHtml: function (string) {
|
||||
|
||||
let entityMap = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
'/': '/',
|
||||
'`': '`',
|
||||
'=': '='
|
||||
};
|
||||
|
||||
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap(s) {
|
||||
return entityMap[s];
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
updateACURI: function (types) {
|
||||
this.accountAutoCompleteURI =
|
||||
document.getElementsByTagName('base')[0].href +
|
||||
|
@ -100,7 +100,7 @@ export default {
|
||||
for (const key in res.data) {
|
||||
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
||||
current = res.data[key];
|
||||
current.description = this.escapeHtml(res.data[key].description)
|
||||
current.name = this.escapeHtml(res.data[key].name)
|
||||
escapedData.push(current);
|
||||
}
|
||||
}
|
||||
@ -110,6 +110,25 @@ export default {
|
||||
// any error handler
|
||||
})
|
||||
},
|
||||
escapeHtml: function (string) {
|
||||
|
||||
let entityMap = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
'/': '/',
|
||||
'`': '`',
|
||||
'=': '='
|
||||
};
|
||||
|
||||
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap(s) {
|
||||
return entityMap[s];
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
handleInput(e) {
|
||||
if (typeof this.$refs.input.value === 'string') {
|
||||
this.$emit('input', this.$refs.input.value);
|
||||
|
Loading…
Reference in New Issue
Block a user