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++) {
|
||||
var type = matches[j].__ctype__;
|
||||
if (type == "rdonly") {
|
||||
if (type == "rdonly" || type == "rdlink") {
|
||||
var text = htmlEscape(value);
|
||||
if (text) {
|
||||
matches[j].innerHTML = text;
|
||||
@ -247,7 +247,6 @@ function updateValues(message, src) {
|
||||
function reqJSON(s, url, successHandler, errorHandler) {
|
||||
var xhr = typeof XMLHttpRequest != 'undefined' ? new XMLHttpRequest()
|
||||
: new ActiveXObject('Microsoft.XMLHTTP');
|
||||
url = encodeURI(url);
|
||||
if (debugCommunication) {
|
||||
console.log("%cto server (reqJSON): %s",
|
||||
"color:white;background:lightgreen", url);
|
||||
@ -274,7 +273,6 @@ function reqJSON(s, url, successHandler, errorHandler) {
|
||||
function reqJSONPOST(s, url, parameters, successHandler, errorHandler) {
|
||||
var xhr = typeof XMLHttpRequest != 'undefined' ? new XMLHttpRequest()
|
||||
: new ActiveXObject('Microsoft.XMLHTTP');
|
||||
url = encodeURI(url);
|
||||
if (debugCommunication) {
|
||||
console.log("%cto server (reqJSON): %s",
|
||||
"color:white;background:lightgreen", url);
|
||||
|
@ -48,7 +48,7 @@ function createContentConsole(s) {
|
||||
histIndex = -1;
|
||||
// Request for command.
|
||||
reqJSON(s, "http://" + hostPort + "/sendcommand?command="
|
||||
+ commandline.value + "&id=" + clientID, successHandler,
|
||||
+ encodeURIComponent(commandline.value) + "&id=" + clientID, successHandler,
|
||||
errorHandler);
|
||||
commandline.value = "";
|
||||
};
|
||||
|
@ -27,7 +27,7 @@ function getGroup(s, name) {
|
||||
}
|
||||
|
||||
function sendCommand(s, command) {
|
||||
reqJSON(s, "http://" + hostPort + "/sendcommand?command=" + command
|
||||
reqJSON(s, "http://" + hostPort + "/sendcommand?command=" + encodeURIComponent(command)
|
||||
+ "&id=" + clientID, successHandler, errorHandler);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user