Fix #64166: quoted-printable-encode stream filter incorrectly discarding...#272
Closed
slusarz wants to merge 4 commits intophp:masterfrom
slusarz:bugfixes
Closed
Fix #64166: quoted-printable-encode stream filter incorrectly discarding...#272slusarz wants to merge 4 commits intophp:masterfrom slusarz:bugfixes
slusarz wants to merge 4 commits intophp:masterfrom
slusarz:bugfixes
Conversation
…ing whitespace If trailing whitespace on a line is detected, mark the linebreak as a soft linebreak.
Contributor
There was a problem hiding this comment.
Why this produces "FIRST{SPACE}" when quoted_printable_encode in this situation produces "FIRST=20"?
Contributor
|
This patch seems to work differently with join and split writes: <?php
$data1 = "FIRST ";
$data2 = "\nSECOND";
$fd = fopen('t', 'w+');
$res = stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_WRITE, array(
'line-break-chars' => "\n",
'line-length' => 7
));
fwrite($fd, $data1);
fwrite($fd, $data2);
//fwrite($fd, $data1.$data2);
fclose($fd);
var_dump(file_get_contents('t'));If I do split write, I get this: I don't think this is a right behavior. |
…ing whitespace Second attempt: need to use lookaheadto determine whether to encode ws
Contributor
Author
|
Things should be fixed now. |
|
Comment on behalf of stas at php.net: merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
... whitespace
If trailing whitespace on a line is detected, mark the linebreak as a
soft linebreak.