Ticket #585 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Quoted-printable decoding happens twice - _read_attribute_value() decodes, but doesn't clear the flags

Reported by: nicholas Owned by: cstender
Priority: highest Milestone: Plugin Format: vformat 0.40
Component: Format Plugin: vformat Version: 0.33
Severity: normal Keywords: r2603
Cc:

Description

This vcard:

BEGIN:VCARD
VERSION:2.1
N:Citizens Advice Bureaux
NOTE;ENCODING=QUOTED-PRINTABLE:  =3D1 
END:VCARD

Was being parsed properly. it was saying "xmlEscapeEntities : char out of range".

This is because =3D1 is converted to =1, which is almost still valid Q-P... Other similar problems happen with =3DD etc, which is parsed as if it was =D in QP.

Should the flag be cleared, like this:

  • src/vformat.c

     
    449449               lp = g_utf8_next_char (lp); /* \n */ 
    450450               lp = g_utf8_next_char (lp); /* start of the next line */ 
    451451       } 
    452  
     452       /* We've decoded the encoding now, so it's RAW */ 
     453       attr->encoding = VF_ENCODING_RAW; 
     454       attr->encoding_set = FALSE; 
    453455       *p = lp; 
    454456} 

which now gives:

<?xml version="1.0"?>
<contact>
  <Name>
    <LastName>Citizens Advice Bureaux</LastName>
  </Name>
  <Note>
    <Content>  =1 </Content>
  </Note>
</contact>

which is what we want to see in the xmlformat.

Change History

comment:1 Changed 4 years ago by dgollub

  • Owner changed from dgollub to cstender
  • Priority changed from normal to highest
  • Component changed from OpenSync to Plugin: vformat
  • Milestone set to OpenSync 0.40

Christopher, could you please review it as well. Otherwise i'll have a look later on this... would be nice to resolve this for 0.34

comment:2 Changed 4 years ago by cstender

  • Status changed from new to assigned

comment:3 Changed 4 years ago by cstender

  • Status changed from assigned to closed
  • Resolution set to fixed

fixed with rev2749.

Note: See TracTickets for help on using tickets.