fixed issues with escaping characters and bad error messages

pull/58/head
tomasz t 2022-02-03 00:11:20 +01:00
rodzic 3b9ae24d24
commit 1495eb98bc
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -165,7 +165,7 @@ function addDefibrillatorToOSM(changesetId, data) {
Object.entries(data.tags).map(arr => {
var tag = document.createElementNS(null, "tag");
tag.setAttribute("k", arr[0]);
tag.setAttribute("v", arr[1]);
tag.setAttribute("v", escape(arr[1]));
return tag;
}).forEach(el => {
node.appendChild(el);
@ -219,7 +219,7 @@ function saveNode(data) {
.catch(err => {
stopSaveButtonAnimation();
console.log(err);
showFailureModal(err);
showFailureModal(`${err} <br> status: ${err.status} ${err.statusText} <br> ${err.response}`);
});
}
@ -362,7 +362,7 @@ function update() {
}, (err, res) => {
if (err) {
updateAddNodeButtonState();
showFailureModal(err);
showFailureModal(`${err} <br> status: ${err.status} ${err.statusText} <br> ${err.response}`);
} else {
const u = res.getElementsByTagName('user')[0];
const user_name = u.getAttribute('display_name');