[dokuwiki] New PR: Remove empty action attributes from forms
- From: "petrkajzar" <wiki@xxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Fri, 21 Aug 2020 22:42:44 +0200 (CEST)
Hi,
petrkajzar opened a new pull request at
https://github.com/splitbrain/dokuwiki/pull/3237:
Empty `action` attribute is an error in HTML5, according to specs,
The action and formaction content attributes, if specified, must have
a value that is a valid non-empty URL potentially surrounded by
spaces.
See:
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fs-action
So, in HTML5, providing an empty `action` attribute is an error and
therefore should be removed.
### Note on older versions
However, in older versions (HTML 4.01 and XHTML, for example), `action`
attribute is **required** and has to contain an URI:
```
<!ATTLIST form
%attrs;
action %URI; #REQUIRED
...
```
See:
*
https://www.w3.org/TR/html401/strict.dtd
*
https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
### Conclusion
So, hereby I just suggest if it would not be better to delete this attribute
completely as it shows as error in HTML5 validation. But, although DokuWiki
runs HTML5, keep in mind that in HTML 4.01 or XHTML the attribute `action`
is required (i.e. maybe really old browsers could have problems, IE 11 is fine,
I have tested that).
Please help us to review this pull request, so new contributors get feedback in
a timely manner.
dc8a6380-e3ee-11ea-8466-4fb900e6906d
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist
Other related posts:
- » [dokuwiki] New PR: Remove empty action attributes from forms - petrkajzar