e_text_to_html_full: Use large enough buffer for character escape
I subscribe to CardDAV URL https://cal.aegee.org/dav/addressbooks/user/cal/bodies/ without password, e.g. by creating a collection account for server aegee.org . It contains this vCard 3.0:
BEGIN:VCARD
VERSION:3.0
KIND:org
UID:e947872a-224b-4c84-8d25-90a541a9ec5-109
EMAIL:*****@aeg**-**nnheim.de
ORG:AEGEE;Antenna
CATEGORIES:Antenna
ADR:;;;;;;Germany
LABEL:AEGEE-Mannheim e.V. Universität Mannheim Postfach 39 L1,1 68131
Mannheim (Mannheim, Germany)
NOTE:Mannheim's antenna has the real 🇪🇺🇪🇺AEGEE spirit🇪🇺
🇪🇺 and one of the best websites in the AEGEE universe! 🌍 www.aegee
-mannheim.de/en 🌍
URL:https://www.aegee-mannheim.de
BDAY:19980103
REV:20200909T205306Z
FN:AEGEE-Mannheim
N:;AEGEE-Mannheim;;;
END:VCARD
The vCard can be obtained e.g. by calling curl -v https://cal.aegee.org/dav/addressbooks/user/cal/bodies/e947872a-224b-4c84-8d25-90a541a9ec5-109.vcf
which returns content-type: text/vcard; charset=utf-8
.
It can be obtained also calling
curl -XREPORT https://cal.aegee.org/dav/addressbooks/user/cal/bodies/ -Hcontent-type:application/xml --data-binary @- <<EOF
<?xml version="1.0" encoding="utf-8" ?>
<C:addressbook-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
<D:prop>
<D:getetag/>
<D:getcontenttype/>
<C:address-data>
<C:prop name="VERSION"/>
<C:prop name="UID"/>
<C:prop name="NICKNAME"/>
<C:prop name="EMAIL"/>
<C:prop name="FN"/>
</C:address-data>
</D:prop>
<D:href>/dav/addressbooks/user/cal/bodies/e947872a-224b-4c84-8d25-90a541a9ec5-109.vcf</D:href>
</C:addressbook-multiget>
EOF
The answer is:
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
<D:response>
<D:href>/dav/addressbooks/user/cal/bodies/e947872a-224b-4c84-8d25-90a541a9ec5-109.vcf</D:href>
<D:propstat>
<D:prop>
<D:getetag>"a91cdb8dbf011fa1a5f59084660ce0214931e28b"</D:getetag>
<D:getcontenttype>text/vcard; charset=utf-8</D:getcontenttype>
<C:address-data><![CDATA[BEGIN:VCARD
VERSION:3.0
UID:e947872a-224b-4c84-8d25-90a541a9ec5-109
EMAIL:*****@aeg**-**nnheim.de
FN:AEGEE-Mannheim
END:VCARD
]]></C:address-data>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response></D:multistatus>
In all cases, the charset UTF-8 is attached to the Content-Type.
The Address Card preview in Evolution shows as Notes just the text “Mannheim's antenna has the real 🇪”.
If I open the contact, in the Notes tab the text is displayed correctly “Mannheim's antenna has the real
That said the Notes-Preview has difficulties rendering UTF-8.