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

Textarea with linefeeds - Fixes #1068 #1069

Merged
merged 2 commits into from
Jul 3, 2013

Conversation

twalpole
Copy link
Member

This makes the behavior of textareas with linefeeds in RackTest more like the behavior with Selenium - Fix for issue #1068

@twalpole
Copy link
Member Author

@jnicklas I moved the modify textarea contents part of this into one place Capybara::HTML - If there's a different place you think it would fit better (or different name) let me know and I'll make that change

@jnicklas
Copy link
Collaborator

jnicklas commented May 9, 2013

It almost sounds like this should be fixed upstream in Nokogiri?

@twalpole
Copy link
Member Author

twalpole commented May 9, 2013

I think there is a good argument to be made that the textarea parsing portion of this is a bug in Nokogiri or more exactly libxml2 when parsing html. However since we already had a partial fix for this in capybara (which "breaks" submission in some cases) it might be worth making the fix correct and then seeing if we can get it fixed upstream. The cr/lf portion of this affecting submission is not an issue in nokogiri - its just mimicking the behavior of full browsers

@twalpole
Copy link
Member Author

twalpole commented May 9, 2013

@jnicklas the requirement for ignoring leading line breaks comes from http://www.w3.org/TR/html401/appendix/notes.html#notes-line-breaks - This specifically refers to rendering, and browsers have taken this to affect the value - I think this makes the case that its an issue in parsing in Nokogiri/libxml2 less clear

jnicklas added a commit that referenced this pull request Jul 3, 2013
@jnicklas jnicklas merged commit 50993f2 into teamcapybara:master Jul 3, 2013
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.

2 participants