Opened 6 years ago

Closed 6 years ago

#1485287 closed Bugs (fixed)

Can't convert message body when html meta tag charset name includes UNDERBAR(_)

Reported by: alping Owned by:
Priority: 5 Milestone: 0.2-beta
Component: PHP backend Version: 0.2-alpha
Severity: normal Keywords: ks_c_5601-1987, charset
Cc:

Description

In Roundcube 0.2 alpha-1, roundcube fails to render message body that encoded by ks_c_5601-1987 charset.(ks_c_5610-1987 is supported by Roundcube. See ticket:1484380 )

Because Regular Expression used by 'rcmail_print_body function' for charset name is '[a-z0-9-]'(See source:tags/roundcubemail/v0.2-alpha/program/steps/mail/func.inc#L539 ).
So RoundCube can't find 'ks_c_5601-1987 charset', and can't replace it to 'RCMAIL_CHARSET'(in my case, UTF-8 ).

Instead of 'UTF-8', RoundCube changes meta tag charset name to 'UTF-8_c_5601-1987'. This is Wrong Charset. DOMDocument Object can't understand it(this is used in washhtml, source:tags/roundcubemail/v0.2-alpha/program/lib/washtml.php#L188), and fails to render them.

To fix it, I think '[a-z0-9-]' will be replaced with '[a-z0-9-_]'.

Change History (2)

comment:1 Changed 6 years ago by alec

  • Component changed from Core functionality to PHP backend
  • Milestone changed from later to 0.2-beta

Fixed in [80c1eb7b]

comment:2 Changed 6 years ago by alec

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.