mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
- prevent xss attack
- no need to decodeString() in javascript anymore
This commit is contained in:
parent
24d41c956d
commit
14755b838a
|
@ -87,7 +87,7 @@ function printTree($path, $level = 0)
|
|||
for ($i = 0; $i < count($documents); $i++) {
|
||||
print "<li>\n";
|
||||
print "<img class='treeicon' src=\"images/blank.png\">";
|
||||
print "<a class=\"foldertree_selectable\" href=\"javascript:documentSelected(".$documents[$i]->getID().",'".str_replace("'", "\\'", $documents[$i]->getName())."');\"><img src=\"images/file.gif\" border=0>".htmlspecialchars($documents[$i]->getName())."</a>";
|
||||
print "<a class=\"foldertree_selectable\" href=\"javascript:documentSelected(".$documents[$i]->getID().",'".str_replace("'", "\\'", htmlspecialchars($documents[$i]->getName()))."');\"><img src=\"images/file.gif\" border=0>".htmlspecialchars($documents[$i]->getName())."</a>";
|
||||
print "</li>";
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ var targetName;
|
|||
var targetID;
|
||||
|
||||
function documentSelected(id, name) {
|
||||
targetName.value = decodeString(name);
|
||||
targetName.value = name; //decodeString(name);
|
||||
targetID.value = id;
|
||||
window.close();
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user