oalders / html-restrict

HTML::Restrict - Strip away unwanted HTML tags
Other
10 stars 9 forks source link

whitespace stripping #36

Closed ryleyb closed 5 years ago

ryleyb commented 5 years ago

In version v2.2.2, this happens:

ryleyb$ perl -MHTML::Restrict -e "print '\''.HTML::Restrict->new()->process('B ').\"'\n\""
'B'

Before I dig further, is that expected? I would have expected my whitespace to come through unmolested.

oalders commented 5 years ago

It is expected, but you can turn it off via trim => 0.

perl -MHTML::Restrict -e "print '\''.HTML::Restrict->new(trim => 0)->process('B ').\"'\n\""
'B '
ryleyb commented 5 years ago

Thank you, I had the feeling it was a "Friday afternoon" type issue!

On Fri, Feb 22, 2019 at 7:19 PM Olaf Alders notifications@github.com wrote:

It is expected, but you can turn it off via trim => 0.

perl -MHTML::Restrict -e "print '\''.HTML::Restrict->new(trim => 0)->process('B ').\"'\n\""'B '

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/oalders/html-restrict/issues/36#issuecomment-466611395, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfiIqvVvGxIbefQFP617IeVO5M9VqSlks5vQLMtgaJpZM4bMj82 .

oalders commented 5 years ago

I appreciate you getting in touch about it. Feel free to reach out if you run into any other issues. :)