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

Check type of attribute values #189

Merged
merged 1 commit into from Sep 18, 2018
Merged

Conversation

katehedgpeth
Copy link
Contributor

fixes #188

Adds a type check to Floki.RawHTML.build_attrs/2, to ensure that the attributes are a string before checking for double quotes inside of attributes.

@sourcelevel-bot
Copy link

Hello, @katehedgpeth! This is your first Pull Request that will be reviewed by Ebert, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

Copy link
Owner

@philss philss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds great to me, @katehedgpeth! I only added one minor issue to be fixed (please amend or rebase).

I would like to recommend running mix format path/of/file using the latest Elixir version if possible.

Thank you again! 😃

defp build_attrs({attr, value}, attrs) do
defp build_attrs({attr, iodata}, attrs) when is_list(iodata) do
build_attrs({attr, IO.iodata_to_binary(iodata)}, attrs)
end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add one line after this end, since the formatter tells us to do.

@katehedgpeth
Copy link
Contributor Author

@philss apologies for the delay -- updated!

@philss
Copy link
Owner

philss commented Sep 18, 2018

@katehedgpeth no worries, thank you!

@philss philss merged commit a4357ef into philss:master Sep 18, 2018
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

Successfully merging this pull request may close these issues.

Bug: attribute values can no longer be iodata lists
2 participants