Ignore disabled form inputs #197

Merged
merged 1 commit into from Aug 20, 2016

Conversation

Projects
None yet
2 participants
@kklemon

kklemon commented Jun 29, 2016

Disabled input elements are not in included in the emerging request in general according to 1 and 2 which doesn't seems to be recognized by lxml yet.

These changes do not really implements the standard perfectly which includes also rules for which the disabled attribute would be invalid, but it's actually the way most browsers are handling it by disabling an input just when the disabled attribute is set at all independently of the actual value.

@scoder

This comment has been minimized.

Show comment
Hide comment
@scoder

scoder Jul 24, 2016

Member

Thanks. Please provide a test.

Member

scoder commented Jul 24, 2016

Thanks. Please provide a test.

@kklemon

This comment has been minimized.

Show comment
Hide comment
@kklemon

kklemon Jul 26, 2016

Done.

It seems like for XHTML the corresponding attribute would have to be exactly disabled="disabled" as XHTML does not support minimized attributes. I'm not sure if lxml does really distinguish here, but I noticed that it maybe could make sense to recognize this in the xhtml_to_html() function in lxml.html by unminimizing HTML attributes when converting to XHTML.

kklemon commented Jul 26, 2016

Done.

It seems like for XHTML the corresponding attribute would have to be exactly disabled="disabled" as XHTML does not support minimized attributes. I'm not sure if lxml does really distinguish here, but I noticed that it maybe could make sense to recognize this in the xhtml_to_html() function in lxml.html by unminimizing HTML attributes when converting to XHTML.

@scoder scoder merged commit 714b95c into lxml:master Aug 20, 2016

@scoder

This comment has been minimized.

Show comment
Hide comment
@scoder

scoder Aug 20, 2016

Member

I think your idea of converting these back and forth in xhtml_to_html() and html_to_xhtml() is a good one. Could you code up a pull request for that, too?

Member

scoder commented Aug 20, 2016

I think your idea of converting these back and forth in xhtml_to_html() and html_to_xhtml() is a good one. Could you code up a pull request for that, too?

@kklemon kklemon deleted the kklemon:ignore-disabled-inputs branch Aug 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment