flavorjones / loofah

Ruby library for HTML/XML transformation and sanitization
MIT License
934 stars 138 forks source link

A whitespace handling change in v2.9.0 is breaking a test in our code #219

Closed mileslane closed 3 years ago

mileslane commented 3 years ago

https://github.com/flavorjones/loofah/compare/v2.8.0...v2.9.0#diff-0977c268a3e3630c81f59206381853a7eb24b3178a2c8e6565e5d0fb2f5bb7b5R107

   expected: "<a href=\"https://site.com\"> This is a link </a><span style=\"font-family: arial, he...</span>"

        got: "<a href=\"https://site.com\"> This is a link </a><span style=\"font-family:arial , he...</span>"
flavorjones commented 3 years ago

Hi, thanks for opening this issue and apologies that you're seeing this problem.

Yes, there was a change in whitespace handling in v2.9.0 related to some significant changes to how properties are being parsed and sanitized. Please update your test to either ignore non-semantic whitespace, or to reflect the updated output. Sorry for the inconvenience.