Replace the ' with a single quote after getting it from the cache. And escape the back slashes.
This commit is contained in:
@@ -337,6 +337,9 @@
|
|||||||
freeswitch.consoleLog("notice", "[xml_handler] sofia.conf source: database\n");
|
freeswitch.consoleLog("notice", "[xml_handler] sofia.conf source: database\n");
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
--replace the ' back to a single quote
|
||||||
|
XML_STRING = XML_STRING:gsub("'", "'");
|
||||||
|
|
||||||
--send to the console
|
--send to the console
|
||||||
if (debug["cache"]) then
|
if (debug["cache"]) then
|
||||||
freeswitch.consoleLog("notice", "[xml_handler] sofia.conf source: memcache\n");
|
freeswitch.consoleLog("notice", "[xml_handler] sofia.conf source: memcache\n");
|
||||||
@@ -439,6 +442,8 @@
|
|||||||
if (XML_STRING == "-ERR NOT FOUND") then
|
if (XML_STRING == "-ERR NOT FOUND") then
|
||||||
continue = true;
|
continue = true;
|
||||||
else
|
else
|
||||||
|
--replace the ' back to a single quote
|
||||||
|
XML_STRING = XML_STRING:gsub("'", "'");
|
||||||
continue = false;
|
continue = false;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -920,6 +925,7 @@
|
|||||||
XML_STRING = table.concat(xml, "\n");
|
XML_STRING = table.concat(xml, "\n");
|
||||||
|
|
||||||
--set the cache
|
--set the cache
|
||||||
|
XML_STRING = XML_STRING:gsub("\\\\\\%$", "\\\\\\\\\\%$");
|
||||||
result = trim(api:execute("memcache", "set " .. call_context .. " '"..XML_STRING:gsub("'", "'").."' "..expire["dialplan"]));
|
result = trim(api:execute("memcache", "set " .. call_context .. " '"..XML_STRING:gsub("'", "'").."' "..expire["dialplan"]));
|
||||||
|
|
||||||
--send the xml to the console
|
--send the xml to the console
|
||||||
@@ -934,6 +940,10 @@
|
|||||||
freeswitch.consoleLog("notice", "[xml_handler] dialplan: "..call_context.." source: database\n");
|
freeswitch.consoleLog("notice", "[xml_handler] dialplan: "..call_context.." source: database\n");
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
--replace the ' back to a single quote
|
||||||
|
XML_STRING = XML_STRING:gsub("'", "'");
|
||||||
|
freeswitch.consoleLog("notice", "[xml_handler] dialplan: "..XML_STRING.."\n");
|
||||||
|
|
||||||
--send to the console
|
--send to the console
|
||||||
if (debug["cache"]) then
|
if (debug["cache"]) then
|
||||||
freeswitch.consoleLog("notice", "[xml_handler] dialplan: "..call_context.." source: memcache\n");
|
freeswitch.consoleLog("notice", "[xml_handler] dialplan: "..call_context.." source: memcache\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user