The sfWdiget class doesn't render the input tag correctly when not in xhtml mode. The input tag is the only form element in html4 which does not have an closing tag ( <input></input> ), while others do ( eg select, textarea ). Because sfWidget is not loaded by the autoload cache it is impossible to copy this file and fix it because an update to my symfony copy will revert my fix. :(
sfWidget, line 278:
return sprintf('<%s%s%s', $tag, $this->attributesToHtml($attributes), self::$xhtml ? ' />' : sprintf('></%s>', $tag));
The fix is:
return sprintf('<%s%s%s', $tag, $this->attributesToHtml($attributes), self::$xhtml ? ' />' : ( $tag != 'input' ? sprintf('></%s>', $tag) : '>' ));
Thanks