手册:$wgCleanupPresentationalAttributes

This page is a translated version of the page Manual:$wgCleanupPresentationalAttributes and the translation is 92% complete.
输出: $wgCleanupPresentationalAttributes
在CSS中放置尽可能多的演示HTML属性。
引进版本:1.19.0 (r94465)
移除版本:1.20.1 (Gerrit change 31290; git #5f41c8ba)
允许的值:(布尔值)
默认值:true

细节

将自HTML5开始不推荐使用的某些表示属性,并将它们在HTML5中删除(例如valign),改为它们各自的内联CSS样式。 这使维基可以继续在简短的维基文本中使用它们,但仍输出有效的现代标记。 请注意,其中排除了某些属性。即img和object中的内容,‎<center>以及表格cellpacing和cellpadding,这些内容很难转换为内联CSS。

该变量仅在启用$wgHtml5 时生效。

移除

此功能已从MediaWiki核心中删除,因为它进行了许多不正确的转换(任务T42632),包括至少一个根本不应该进行的转换(任务T43018)。 它的删除已作为MediaWiki 1.20.1维护版本的一部分反向移植到MediaWiki 1.20。

MediaWiki 1.19 users should disable this feature (by adding $wgCleanupPresentationalAttributes = false; to the end of LocalSettings.php) if they experience problems with the following HTML attributes:

"align", "clear", "height", "nowrap", "size", "type", "valign", "width"