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

Ignore disabled form inputs #197

Merged
merged 1 commit into from Aug 20, 2016
Merged

Conversation

@kklemon
Copy link

@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
Copy link
Member

@scoder scoder commented Jul 24, 2016

Thanks. Please provide a test.

@kklemon kklemon force-pushed the ignore-disabled-inputs branch from 3db7acd to bc6da1e Jul 26, 2016
@kklemon
Copy link
Author

@kklemon 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
Copy link
Member

@scoder 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 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
Labels
None yet
Projects
None yet
2 participants