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

Attributes' names are forced lowercase #42

Closed
qertoip opened this issue Jan 24, 2016 · 3 comments
Closed

Attributes' names are forced lowercase #42

qertoip opened this issue Jan 24, 2016 · 3 comments
Milestone

Comments

@qertoip
Copy link

qertoip commented Jan 24, 2016

Floki forces attributes' names lowercase. Failing test case:

defmodule FlokiTest do
  use ExUnit.Case

  test "preserves case of attributes names" do
    xml = ~s(<root ID="1"/>)
    [{"root", [{attrName, "1"}], []}] = Floki.find(xml, "root")
    assert(attrName == "ID")
  end    
end
@philss
Copy link
Owner

philss commented Jan 25, 2016

@qertoip Thanks for the report!

This is a problem in the parsing step. Unfortunately the parser is under the mochiweb code base. I'm working to get a built-in parser soon. I will let this issue open until I can solve this.

@philss philss added this to the 1.0 milestone Feb 14, 2016
@ckruse
Copy link
Contributor

ckruse commented Feb 23, 2016

since HTML is case-insensitive, this is IHMO the right behaviour

@philss
Copy link
Owner

philss commented Jul 31, 2016

I agree with @ckruse. This is the expected behavior since Floki is not supposed to be fully compatible with XML. Thanks for the report and sorry for the delay, @ckruse.

@philss philss closed this as completed Jul 31, 2016
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

No branches or pull requests

3 participants