HTML::Document.new("<body><br />").root.to_s => "<body><br /></body>"
Note that in the above example, the closing tag is correctly inferred. To be consistent, HTML::Document should behave with:
HTML::Document.new("<body>").root.to_s => "<body></body>"
However, the actual output is:
This is the root cause of the fact that testing failed to catch #7894.
what's this about? Can you add description to this so people can understand what you are talking about?
After investigating the issue included with this PR, I saw that <%= form_tag "" %> returns invalid html because it does not close the form-tag with </form>.
<%= form_tag "" %>
<%= form_tag '/posts' %> for instance does this correct.
<%= form_tag '/posts' %>
I can't see why anyone would want to use the form_tag with an empty string though, wouldn't it be better to enforce people passing a block when using this helper?
Closing this in favor of #7894
vijaydev, could you clarify what "closing in favor of" means? It sounds to me like that means you're not going to pull this fix. #7894 is a distinct issue. Fixing it doesn't fix this issue, though fixing this issue makes it possible to test #7894.
I mean, let's have one issue/PR where the whole thing is sorted out. You've anyway made a single PR which apparently fixes both issues.
Yes, since #7896 blocked testing of #7894 but could be fixed in isolation,
I thought it made sense to wrap them in a single PR but two separate
commits. Was that the right move?