Skip to content

Commit

Permalink
Fix single replace with multiple replace
Browse files Browse the repository at this point in the history
  • Loading branch information
cavenel committed Dec 4, 2023
1 parent 2822b50 commit c230356
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugins_repo/3.0/Spot_Inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ Spot_Inspector.loadImages = function (pathFormat) {
},
error: function (data) {
interfaceUtils.alert(
data.responseText.replace("\n", "<br/>"),
data.responseText.replace(/\n/g, "<br/>"),
"Error on the plugin's server response",
);
},
Expand Down Expand Up @@ -781,7 +781,7 @@ Spot_Inspector.getMatrix = function (bbox, layers, markers, order) {
},
error: function (data) {
interfaceUtils.alert(
data.responseText.replace("\n", "<br/>"),
data.responseText.replace(/\n/g, "<br/>"),
"Error on the plugin's server response",
);
},
Expand Down
2 changes: 1 addition & 1 deletion plugins_repo/latest/Points2Regions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ Points2Regions._api = function (endpoint, data, success, error) {
? error
: function (data) {
interfaceUtils.alert(
data.responseText.replace("\n", "<br/>"),
data.responseText.replace(/\n/g, "<br/>"),
"Error on the plugin's server response:",
);
},
Expand Down
2 changes: 1 addition & 1 deletion plugins_repo/latest/Spot_Inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Spot_Inspector.loadImages = function (pathFormat) {
},
error: function (data) {
interfaceUtils.alert(
data.responseText.replace("\n", "<br/>"),
data.responseText.replace(/\n/g, "<br/>"),
"Error on the plugin's server response",
);
},
Expand Down
2 changes: 1 addition & 1 deletion tissuumaps/static/js/utils/pluginUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pluginUtils.loadParameters = function (pluginID, pluginDiv, parameters) {
// do something, not critical.
},
error: (error) ? error : function (data) {
interfaceUtils.alert(data.responseText.replace("\n","<br/>"),"Error on the plugin's server response:");
interfaceUtils.alert(data.responseText.replace(/\n/g,"<br/>"),"Error on the plugin's server response:");
},
});
}
Expand Down

0 comments on commit c230356

Please sign in to comment.