Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ext/standard/filters.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,9 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins
*(pd++) = qp_digits[(c & 0x0f)];
ocnt -= 3;
line_ccnt -= 3;
trail_ws--;
if (trail_ws > 0) {
trail_ws--;
}
CONSUME_CHAR(ps, icnt, lb_ptr, lb_cnt);
}
}
Expand Down
19 changes: 19 additions & 0 deletions ext/standard/tests/streams/bug65483.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--TEST--
Bug #65483: quoted-printable encode stream filter incorrectly encoding spaces
--FILE--
<?php

$data = 'a b=c d';

$fd = fopen('php://temp', 'w+');
fwrite($fd, $data);
rewind($fd);

$res = stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_READ);
var_dump(stream_get_contents($fd, -1, 0));

fclose($fd);

?>
--EXPECT--
string(9) "a b=3Dc d"