Merge branch 'master' into 'master'

Enclose XML response to only contain the XML tags (trimming any possible...

See merge request davical-project/davical!82
This commit is contained in:
Nick v H 2025-05-02 20:01:25 +00:00
commit eabd7d3ae0

View File

@ -119,12 +119,13 @@ class CalDAVClient {
*/
function ParseResponse( $response ) {
$pos = strpos($response, '<?xml');
$epos = strrpos($response, '>');
if ($pos === false) {
$this->httpResponse = trim($response);
}
else {
$this->httpResponse = trim(substr($response, 0, $pos));
$this->xmlResponse = trim(substr($response, $pos));
$this->xmlResponse = trim(substr($response, $pos, $epos-$pos+1));
}
}