floki
floki copied to clipboard
Floki.raw_html/2 doesn't correctly encode attributes with both single and double quotes
Example:
iex(21)> "<span data-stuff=\""'\">" |> Floki.parse |> Floki.raw_html
"<span data-stuff='\"''></span>"
Expected either:
"<span data-stuff='\"''></span>"
or
"<span data-stuff=\""'\"></span>"
@ericlathrop sorry for the delay. Thank you for open it. I believe this can be fixed almost in the same way that was in Meeseeks.
Hi @philss, I've created a PR (#227) for this. Hope to get some feedback from you.
@danhuynhdev Thank you! :purple_heart:
I'm going to take a look this week, I hope. It looks like it fixes the problem, but I want to check some scenarios.