Page MenuHomePhabricator

Remove $wgAllowMicrodataAttributes and $wgAllowRdfaAttributes settings
Closed, ResolvedPublic


The setting $wgAllowMicroDataAttributes could be removed and the microdata attributes could always be allowed.

There doesn't seem to be an evident case use where a wiki could benefit of filtering these attributes, and we now are in HTML 5, so it would simplify MediaWiki configuration.

In the same time, we'll remove $wgAllowRdfaAttributes and so always allow full semantic attributes.


Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 15 2016, 5:53 PM
Dereckson updated the task description. (Show Details)Mar 15 2016, 5:54 PM

I wonder if by coherence we shouldn't handle also $wgAllowRdfaAttributes at the same time.

Change 277562 had a related patch set uploaded (by Dereckson):
Remove $wgAllowMicroDataAttributes setting


If Microdata and RDFa can coexist together without any issue, let's remove both "allow" variables.
If they can't, have rather some sort of more generic variable with predefined values. Eg. $wgMetadataType = "microdata"; $wgMetadataType = "rdfa" (or any other name, this is quick first shot) which would actually prevent accidental setting of both (or even more) "allow"s to true and then possible conflicts.

Dereckson added a comment.EditedMar 15 2016, 7:08 PM

(removed not relevant microformat/RDFa compatibility notes)

About the opportunity of a setting.

I've shortly discussed the issue with @Danny_B on IRC. Before filling T128829 (and later T130034), Danny didn't find any use case where the setting would be interesting and added "the only concern may be the invalidity of output, but my assumption was that tidy removes that if necessary".

Dereckson added a comment.EditedMar 17 2016, 3:50 PM

Okay, so @daniel on Gerrit indicates a preference to also remove $wgAllowRdfaAttributes.

We should document loudly somewhere $wgHtml5Version, so people knows they have to choose a modified HTML version. This could be for example a page on "How to use RDFa on MediaWiki?". Note this is not a job done by $wgAllowRdfaAttributes, but currently, during the setup if you enable the first, it suggests a correct default version.

Dereckson renamed this task from Remove $wgAllowMicrodataAttributes setting to Remove $wgAllowMicrodataAttributes and $wgAllowRdfaAttributes settings.Mar 17 2016, 3:51 PM
Dereckson updated the task description. (Show Details)
Dereckson updated the task description. (Show Details)
Dereckson moved this task from Backlog to In Progress on the MediaWiki-Parser board.

Somewhat relevant old RFC; for which code was completed but simply halted because no-one would review it.

Change 277562 merged by jenkins-bot:
Remove $wgAllowMicroDataAttributes and $wgAllowRdfaAttributes

daniel closed this task as Resolved.Mar 18 2016, 6:13 PM


Dereckson added a comment.EditedMar 18 2016, 7:06 PM

By the way, the version problem will be simplified when we'll move to 1.1:

XML mode XHTML5+RDFa 1.1 documents should be labeled with the Internet Media Type application/xhtml+xml as defined in section 12.3 of the HTML5 specification [html5], must not use a DOCTYPE declaration for XHTML+RDFa 1.0 or XHTML+RDFa 1.1, and should not use the @version attribute.