Fix for bug: Error when imap folder contains a quote in the name

https://sourceforge.net/tracker/?func=detail&atid=554338&aid=1518556&group_id=78745

added htmlspecialchars where needed
This commit is contained in:
Lars Kneschke 2006-07-23 04:06:36 +00:00
parent 140c700a82
commit 8f70271bd2

View File

@ -159,12 +159,17 @@
$image3 = "'kfm_home.png'"; $image3 = "'kfm_home.png'";
} }
$parentName = htmlspecialchars($parentName, ENT_QUOTES, $this->charset);
$longName = htmlspecialchars($longName, ENT_QUOTES, $this->charset);
$folder_name = htmlspecialchars($folder_name, ENT_QUOTES, $this->charset);
$folder_tree_new .= "tree.insertNewItem('$parentName','$longName','$folder_name',onNodeSelect,$image1,$image2,$image3,'$entryOptions');\n"; $folder_tree_new .= "tree.insertNewItem('$parentName','$longName','$folder_name',onNodeSelect,$image1,$image2,$image3,'$entryOptions');\n";
if($_displayCheckBox) if($_displayCheckBox)
$folder_tree_new .= "tree.setCheck('$longName','".(int)$obj->subscribed."');"; $folder_tree_new .= "tree.setCheck('$longName','".(int)$obj->subscribed."');";
} }
$folder_tree_new.= "tree.closeAllItems(0);tree.openItem('$_selected');</script>"; $selected = htmlspecialchars($_selected, ENT_QUOTES, $this->charset);
$folder_tree_new.= "tree.closeAllItems(0);tree.openItem('$selected');</script>";
return $folder_tree_new; return $folder_tree_new;
} }