It's not valid html to nest form tags inside a p tag so your browser is trying to fix it for you. http://www.w3.org/TR/html401/struct/text.html#h-9.3.1
You can verify that the browser is altering this this by:
telnet localhost 3000
GET /wherever/this/is HTTP/1.0
And you will see something like:
<p>
<form action="/dog" method="post"><div style="margin:0;padding:0;display:inline"><input name="authenticity_token" type="hidden" value="HxzAQS/UMwdXmcMzX+qk9eV49JCmwnds9bekrr3YKj0=" /></div></form><form action="/dog" method="post"><div style="margin:0;padding:0;display:inline"><input name="authenticity_token" type="hidden" value="HxzAQS/UMwdXmcMzX+qk9eV49JCmwnds9bekrr3YKj0=" /></div></form></p>