[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformant


Ján Máté <jan.mate@xxxxxxxxxx> writes:

> Hmm, this is interesting, because "<![CDATA[" ... "]]>" must be parsed
> by the browser XML parser and/or jQuery (NOT the client app) ... if
> you get the whole "<![CDATA string" as a result then it is very
> probably a browser bug. [...]
>
> Another problem is maybe your DAViCal version, because my patch is not
> included in 1.1.1 ... so are you sure that both your DAViCal
> installations are exactly the same? What is your client OS and
> browser+version?

The kits for davical (and awl) claim to be the same version but come
from different repos. I manually diffed the installed files on both
systems and found a small diff in awl/inc/XMLElement.php:

*** ./inc/XMLElement.php	Mon May 28 12:42:09 2012
--- ./inc/XMLElement.php	Fri Sep 28 23:01:43 2012
***************
*** 259,265 ****
        * Render the content, with special characters escaped
        *
        */
!       $r .= htmlspecialchars($this->content, ENT_NOQUOTES );
      }
      return $r;
    }
--- 259,268 ----
        * Render the content, with special characters escaped
        *
        */
!       if(strpos($this->content, '<![CDATA[')===0 && strrpos($this->content, ']]>')===strlen($this->content)-3)
!         $r .= '<![CDATA[' . str_replace(']]>', ']]]]><![CDATA[>', substr($this->content, 9, -3)) . ']]>';
!       else
!         $r .= htmlspecialchars($this->content, ENT_NOQUOTES );
      }
      return $r;
    }

I applied this change manually to the awl on the nas and lo and behold!
it works!

Thanks for your ongoing patience in helping me out.

-- Johan

References:
Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformantJohan Vromans <jvromans@xxxxxxxxxxx>
Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformantJán Máté <jan.mate@xxxxxxxxxx>
Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformantJohan Vromans <jvromans@xxxxxxxxxxx>
Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformantJán Máté <jan.mate@xxxxxxxxxx>
Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformantJohan Vromans <jvromans@xxxxxxxxxxx>
Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformantJán Máté <jan.mate@xxxxxxxxxx>