Closed katehedgpeth closed 6 years ago
Hi @katehedgpeth! Thank you! And also thank you for open the issue.
Sorry for the delay. It would be great if you open a PR with this fix! 😄 Please add a test case for this if possible.
@philss PR submitted!
Hi and thanks for this great tool! It's been a big help for us in parsing and incorporating content from our CMS into our phoenix site.
We've recently attempted to upgrade to 0.20.3 and realized that there's a breaking change in a recent commit: https://github.com/philss/floki/commit/c5eb4fddc143c2dd784767e3d1fa5b17acf8df01#diff-89b5940fb49d7d4e900ac542fea22545R87
The above commit checks attribute values for double quotes, but doesn't first ensure that the value is a string. We have some attributes that we build as iodata lists, which has always worked fine until this change.
I'd like to propose adding some guards to this function, and calling
IO.iodata_to_binary
first if the value is a list. I have a PR-ready implementation if this sounds like a change you would like to make; or if there is a better solution, I'd be happy to give it a shot.