forked from openlp/openlp
Make replace work for two or more occurrences.
This commit is contained in:
parent
e94ab832eb
commit
514773abe8
@ -209,7 +209,7 @@ window.OpenLP = {
|
|||||||
showAlert: function (event) {
|
showAlert: function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var text = "{\"request\": {\"text\": \"" +
|
var text = "{\"request\": {\"text\": \"" +
|
||||||
$("#alert-text").val().replace("\\", "\\\\").replace("\"", "\\\"") +
|
$("#alert-text").val().replace(/\\/g, "\\\\").replace(/"/g, "\\\"") +
|
||||||
"\"}}";
|
"\"}}";
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
"/api/alert",
|
"/api/alert",
|
||||||
|
Loading…
Reference in New Issue
Block a user