Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanitizeStreamFilter breaks stream filters with new-line characters in their arguments #122

Closed
HeyRatFans opened this issue Oct 13, 2015 · 1 comment

Comments

@HeyRatFans
Copy link
Contributor

When using appendStreamFilter or prependStreamFilter the name of the filter is sanitised by the sanitizeStreamFilter. This method currently casts the name to a string, trims and returns it.

Trimming the string removes any trailing new-lines or other invisible characters like NULLs or white-space to be removed. This causes problems for filters that expect these characters to be used as arguments. For example a filter that uses str_replace to convert Windows-style line endings (\r\n) to Linux-style (\n) cannot be used because the trailing \n gets removed by the trim call.

This issue affects release 7.1.2 of thephpleague/csv and is known to be present on both PHP 5.6.10 on Ubuntu 14.04 and 5.5.25 on Windows 7.

@nyamsprod
Copy link
Member

This issue is resolved in the master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants