As the web increasingly uses HTML5 input types, this ensures w3m still gets something fairly usable. type=search for example works fine as type=text - in fact, default to text is suggested by the spec. This patch is fairly easy to apply. I did a quick test against w3m 0.5.3 and it worked fine. Reproducible: Always
Could you consider to send the patch to upstream, please.
If you check out the w3m project on sourceforge, it appears to be basically dead. If you have any idea at all who upstream is or how they incorporate patches, it'd be awesome if you could push it along. But right now, it seems the only improvements (this bug as well as bug #413797) come from Debian developers. It'd be nice to have them in Gentoo too though, since they seem to apply cleanly and fix what I'd consider to be actual browser bugs (like search fields not rendering and submit buttons not working)
I've talked with debian w3m package maintainer and decide to share our patch each other. So I applied the patch on bug #413797 This patch is not in debian and also I think this patch is hacky to apply on w3m as it is now. New features like adding <button> support would be ok. It bring some specific tags to be rendered. However this patch change formtype() default return value. Even if the changed line is just one, that line change too many things. We can improve the patch e.g. adding html5 input types explcitly.
Hm. I'd argue that defaulting to type of text is the correct behaviour. So this is more a bug fix. The reason type=search and the other html5 types normally degrade gracefully in browsers allowing a text field for input is: "An input element with no type attribute specified represents the same thing as an input element with its type attribute set to "text"." http://www.w3.org/TR/2011/WD-html-markup-20110113/input.html So, yeah. Adding the HTML5 ones would be awesome. But this is actually a simple immediate compatibility fix that w3m should have had all along.
Hm. Ok. Admittedly that says the *default* should be text. Which while that contradicts the w3m code is not explicit about what happens for an unknown type. However, how all other browsers *behave* on an unknown type is to choose the default. I made a nice little table of my testing :) http://m8y.org/tmp/testcase252.xhtml
Ok, according to comment #3 from half a year ago, you guys want to do a correct implementation of HTML5. Welll, I have no idea how much longer that could take, but could you *please* just add the relatively simple default-to-text as all other browsers do? Right now, increasingly web forms are becoming unusable. Even login forms which now use type="email"
Finally I've added the patch to the tree.
Yay! Thanks! Had almost given up on this one. Was just creating GET strings manually and using "x" binding to submit forms a lot.