Feature #14554
closedXHTML compliance of img tags: should be border="0" for 1.0 transitional and removed (!) for 1.0 strict/1.1
0%
Description
Pages with images in it fail to validate against XHTML 1.0 strict because of the border="0" attribute in <img> tags, which is considered deprecated.
A config option to disable this output with all parts of TYPO3 that produce image code (cObj IMAGE, GMENU...) would be nice, maybe even an automatic solution when config.doctype=xhmtl_strict is set.
(issue imported from #M797)
Files
Updated by Martin Kutschker over 19 years ago
The border attribute has been removed from XHTML 1.1.
Updated by Andreas Schwarzkopf over 19 years ago
The border attribute has also been removed from XHTML 1.0 strict (not deprecated!)
Updated by Rupert Germann over 19 years ago
the atached patch adds a new function to class.tslib_content.php which returns only a border attribute for images if the doctype is not xhtml_strict, xhtml_11 or xhtml_2 or if the config parameter 'disableImgBorderAttr' is not set.
example: config.disableImgBorderAttr=1
will disable border attributes in img tags even if the doctype is not in the list of doctypes which will automatically prevent the use of border attribs.
Updated by Martin Kutschker over 19 years ago
I'm preparing a patch that stores in $TSFE->xhtmlDoctype the actual doctype and in $TSFE->xhtmlVersion the version number (1.0, 1.1, ..).
I hope to get it into the core. So please wait a bit before anybode checks this patch in.
Updated by Rupert Germann over 19 years ago
- fix for bug 797: added a new function to class.tslib_content.php (getBorderAttr()) which returns only a border attribute for images if the doctype is not xhtml_strict, xhtml_11 or xhtml_2 or if the config parameter 'disableImgBorderAttr' is not set.
Setting 'disableImgBorderAttr' to '1' will disable border attributes in <img> tags even if the doctype is not in the list of doctypes above.