diff --git a/api/src/WebDAV/Server.php b/api/src/WebDAV/Server.php index 2860362573..e2cd11a9b1 100644 --- a/api/src/WebDAV/Server.php +++ b/api/src/WebDAV/Server.php @@ -1003,7 +1003,7 @@ class HTTP_WebDAV_Server } elseif (isset($prop['raw'])) { $val = $this->_prop_encode(''); } else { - $val = $this->_prop_encode(htmlspecialchars($prop['val'], ENT_NOQUOTES, 'utf-8')); + $val = $this->_prop_encode(htmlspecialchars($prop['val'], ENT_NOQUOTES|ENT_XML1|ENT_DISALLOWED, 'utf-8')); } echo ' <'.($this->crrnd?'':'D:')."$prop[name]$ns_defs>$val". 'crrnd?'':'D:')."$prop[name]>\n"; @@ -1049,7 +1049,7 @@ class HTTP_WebDAV_Server { foreach($subprop['val'] as $attr => $val) { - $vals .= ' '.$attr.'="'.htmlspecialchars($val, ENT_NOQUOTES, 'utf-8').'"'; + $vals .= ' '.$attr.'="'.htmlspecialchars($val, ENT_NOQUOTES|ENT_XML1|ENT_DISALLOWED, 'utf-8').'"'; } $vals .= '/>'; } @@ -1061,7 +1061,7 @@ class HTTP_WebDAV_Server $vals .= ''; } else { if($subprop['name'] == 'href') $subprop['val'] = $this->_urlencode($subprop['val']); - $vals .= htmlspecialchars($subprop['val'], ENT_NOQUOTES, 'utf-8'); + $vals .= htmlspecialchars($subprop['val'], ENT_NOQUOTES|ENT_XML1|ENT_DISALLOWED, 'utf-8'); } $vals .= ""; } @@ -1072,7 +1072,7 @@ class HTTP_WebDAV_Server { $val = ''; } else { - $val = htmlspecialchars($prop['val'], ENT_NOQUOTES, 'utf-8'); + $val = htmlspecialchars($prop['val'], ENT_NOQUOTES|ENT_XML1|ENT_DISALLOWED, 'utf-8'); } $val = $this->_prop_encode($val); // properties from namespaces != "DAV:" or without any namespace @@ -1199,7 +1199,7 @@ class HTTP_WebDAV_Server if ($responsedescr) { echo ' <'.($this->crrnd?'':'D:')."responsedescription>". - $this->_prop_encode(htmlspecialchars($responsedescr, ENT_NOQUOTES, 'utf-8')). + $this->_prop_encode(htmlspecialchars($responsedescr, ENT_NOQUOTES|ENT_XML1|ENT_DISALLOWED, 'utf-8')). 'crrnd?'':'D:')."responsedescription>\n"; } @@ -2794,7 +2794,7 @@ class HTTP_WebDAV_Server foreach($subprop as $attr => $val) { - $vals .= ' '.$attr.'="'.htmlspecialchars($val, ENT_NOQUOTES, 'utf-8').'"'; + $vals .= ' '.$attr.'="'.htmlspecialchars($val, ENT_NOQUOTES|ENT_XML1|ENT_DISALLOWED, 'utf-8').'"'; } $ret .= '<'.($prop['ns'] == $ns ? ($this->crrnd ? '' : $ns_hash[$ns].':') : $ns_hash[$prop['ns']].':').$prop['name'].