Changeset 35 for trunk/UContact.pas
- Timestamp:
- Nov 25, 2021, 3:04:55 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UContact.pas
r34 r35 117 117 118 118 implementation 119 120 uses 121 UQuotedPrintable; 119 122 120 123 resourcestring … … 226 229 procedure TContactProperty.EvaluateAttributes; 227 230 var 228 I ndex: Integer;231 I: Integer; 229 232 begin 230 233 if Attributes.IndexOf('BASE64') <> -1 then 231 234 Encoding := 'BASE64' 232 235 else 233 if Attributes.IndexOfName('ENCODING') <> -1 then 234 Encoding := Attributes.Values['ENCODING'] 235 else Encoding := ''; 236 if Attributes.IndexOfName('ENCODING') <> -1 then begin 237 Encoding := Attributes.Values['ENCODING']; 238 if (Encoding = 'QUOTED-PRINTABLE') or (Encoding = 'BASE64') then begin 239 Values.DelimitedText := GetDecodedValue; 240 Attributes.Delete(Attributes.IndexOfName('ENCODING')); 241 end; 242 end else Encoding := ''; 236 243 237 244 if Attributes.IndexOfName('CHARSET') <> -1 then … … 240 247 241 248 // Simplify TYPE attribute from TYPE=VALUE into VALUE 242 Index := Attributes.IndexOfName('TYPE'); 243 if Index <> -1 then 244 Attributes.Strings[Index] := Attributes.Values['TYPE']; 249 for I := 0 to Attributes.Count - 1 do begin 250 if Attributes.Names[I] = 'TYPE' then 251 Attributes.Strings[I] := Attributes.Values['TYPE']; 252 end; 245 253 end; 246 254 … … 251 259 else 252 260 if Encoding = 'QUOTED-PRINTABLE' then 253 Result := Values.DelimitedText261 Result := DecodeQuotedPrintable(Values.DelimitedText) 254 262 else Result := ''; 255 263 end;
Note:
See TracChangeset
for help on using the changeset viewer.