note 58841 rejected from function.quoted-printable-decode by jacques

From: Date: Wed, 30 Nov 2005 01:47:21 +0000
Subject: note 58841 rejected from function.quoted-printable-decode by jacques
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-99337@lists.php.net to get a copy of this message
Note Submitter: doug at exploittheweb dot co dot uk ---- To bendi at interia dot pl: I found that the function seems to work better with a change to the regex: <?preg_match_all( '/.{1,74}([^=]{0,2})?/', $sString, $aMatch );?> Note the change from {1,73} and {0,3}. Before, if the function encountered a hexcode (e.g. =3D) at the end of a 76-character chunk, it would chop it off and prepend it to the next chunk. Fair enough if it goes off the end of the chunk; qp-encoded lines should never exceed 76 characters and hexcodes should never be split across lines. But it wasn't allowing them to just be at the end either. Strangley, the symptom I found was that dots would be missing here and there (e.g. in web addresses), so if this is happening to you, try this fix.

« previous php.notes (#99337) next »