fix URI encoding and let SECoP module show value
- URI encoding must happen by element - show values in SECoP module
This commit is contained in:
@ -206,7 +206,7 @@ function updateValues(message, src) {
|
|||||||
|
|
||||||
for (var j = 0; j < matches.length; j++) {
|
for (var j = 0; j < matches.length; j++) {
|
||||||
var type = matches[j].__ctype__;
|
var type = matches[j].__ctype__;
|
||||||
if (type == "rdonly") {
|
if (type == "rdonly" || type == "rdlink") {
|
||||||
var text = htmlEscape(value);
|
var text = htmlEscape(value);
|
||||||
if (text) {
|
if (text) {
|
||||||
matches[j].innerHTML = text;
|
matches[j].innerHTML = text;
|
||||||
@ -247,7 +247,6 @@ function updateValues(message, src) {
|
|||||||
function reqJSON(s, url, successHandler, errorHandler) {
|
function reqJSON(s, url, successHandler, errorHandler) {
|
||||||
var xhr = typeof XMLHttpRequest != 'undefined' ? new XMLHttpRequest()
|
var xhr = typeof XMLHttpRequest != 'undefined' ? new XMLHttpRequest()
|
||||||
: new ActiveXObject('Microsoft.XMLHTTP');
|
: new ActiveXObject('Microsoft.XMLHTTP');
|
||||||
url = encodeURI(url);
|
|
||||||
if (debugCommunication) {
|
if (debugCommunication) {
|
||||||
console.log("%cto server (reqJSON): %s",
|
console.log("%cto server (reqJSON): %s",
|
||||||
"color:white;background:lightgreen", url);
|
"color:white;background:lightgreen", url);
|
||||||
@ -274,7 +273,6 @@ function reqJSON(s, url, successHandler, errorHandler) {
|
|||||||
function reqJSONPOST(s, url, parameters, successHandler, errorHandler) {
|
function reqJSONPOST(s, url, parameters, successHandler, errorHandler) {
|
||||||
var xhr = typeof XMLHttpRequest != 'undefined' ? new XMLHttpRequest()
|
var xhr = typeof XMLHttpRequest != 'undefined' ? new XMLHttpRequest()
|
||||||
: new ActiveXObject('Microsoft.XMLHTTP');
|
: new ActiveXObject('Microsoft.XMLHTTP');
|
||||||
url = encodeURI(url);
|
|
||||||
if (debugCommunication) {
|
if (debugCommunication) {
|
||||||
console.log("%cto server (reqJSON): %s",
|
console.log("%cto server (reqJSON): %s",
|
||||||
"color:white;background:lightgreen", url);
|
"color:white;background:lightgreen", url);
|
||||||
|
@ -48,7 +48,7 @@ function createContentConsole(s) {
|
|||||||
histIndex = -1;
|
histIndex = -1;
|
||||||
// Request for command.
|
// Request for command.
|
||||||
reqJSON(s, "http://" + hostPort + "/sendcommand?command="
|
reqJSON(s, "http://" + hostPort + "/sendcommand?command="
|
||||||
+ commandline.value + "&id=" + clientID, successHandler,
|
+ encodeURIComponent(commandline.value) + "&id=" + clientID, successHandler,
|
||||||
errorHandler);
|
errorHandler);
|
||||||
commandline.value = "";
|
commandline.value = "";
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ function getGroup(s, name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sendCommand(s, command) {
|
function sendCommand(s, command) {
|
||||||
reqJSON(s, "http://" + hostPort + "/sendcommand?command=" + command
|
reqJSON(s, "http://" + hostPort + "/sendcommand?command=" + encodeURIComponent(command)
|
||||||
+ "&id=" + clientID, successHandler, errorHandler);
|
+ "&id=" + clientID, successHandler, errorHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user