Page MenuHomePhabricator

Install "HTML-Tags" on de.wikiversity
Open, LowPublicFeature

Description

Please install the extension "HTML-Tags" (https://www.mediawiki.org/wiki/Extension:HTML_Tags) on de.wikiversity.

You can find the local discussion here: https://de.wikiversity.org/wiki/Wikiversity:Cafeteria#Metadaten

Thank you


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz47566

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:30 AM
bzimport set Reference to bz47566.
bzimport added a subscriber: Unknown Object (MLST).

What HTML tags/attributes would be allowed?

Note this extension isn't deployed anywhere so it isn't currently reviewed. Granted, it's only a relatively small amount of code

I don't see the exact $wgHTMLTagsAttributes that would need to be defined, without tracing through all the templates. Can someone specify the exact tags and attributes that are needed?

[ Adding Max Klein as CC. ]

Chris, I guess, it's mainly <meta> stuff to add in head.

Max, could you give us more information about required tags?

To use HTMLTags for LRMI both <meta> and <span> are needed.

So I believe the required added lines will be

$wgHTMLTagsAttributes['meta'] = array( 'itemprop', 'content' );
$wgHTMLTagsAttributes['span'] = array( 'itemprop', 'itemtype', 'contents' );

Yaron, can you confirm this matches the configuration at
http://lrmi-demo.referata.com/wiki/Main_Page ?

Hi Max,

Close - the lines are:

$gHTMLTagsAttributes['meta'] = array( 'itemprop', 'content' );
$wgHTMLTagsAttributes['span'] = array( 'itemprop', 'itemscope', 'itemtype' );

Personally: This is a pretty neat project, ahem, so, I support getting this reviewed and deployed. I know this is a long time coming, as well.

Is this something you want to/can review, Chris? Since it is modifying html tags?

For the span attributes, is there a reason we can't modify MediaWiki core to allow itemprop, itemscope, and itemtype HTML attributes?

Currently "<span itemprop="name">Blend-O-Matic</span>" is sanitized(?) to "<span>Blend-O-Matic</span>" (might be core's includes/Sanitizer.php, might be something crazy like HTMLTidy). If we're considering these attributes generally safe, why not allow them in core? I'm not sure we need another extension to support this particular functionality.

For the meta tags, they probably need to go into the <head> and I'm not sure the extension can currently do that... you'd probably want a parser function, no?

(In reply to MZMcBride from comment #9)

For the span attributes, is there a reason we can't modify MediaWiki core to
allow itemprop, itemscope, and itemtype HTML attributes?

Right, so MediaWiki core already supports these attributes, they're just intentionally disabled... cf. r61985. It probably makes sense to re-visit and re-evaluate this decision. If nothing else, we could just set [[mw:Manual:$wgAllowMicrodataAttributes]] to true on Wikimedia wikis, but correcting the default behavior is also an option, if apparent consensus has changed from 2010.

I've just seen in my mail that you are still active on this bug. So, I'd like to point out that HTML tags integration in German Wikiversity (which initially aimed at integrating Wikiversity into the educational bookmarking service Edutags) has been stalled due to the end in the Wikiversity relaunch over a year ago. All sysops that were engaged in this project have by now become inactive (Jan Luca) or (Aschmidt and Wvk) have renounced their sysop rights and quit the project. This is why I cannot say whether anyone still needs the extension there at all. I suggest you ask on Wikiversity:Cafeteria before proceeding.

"Another potential usage of HTML Tags is to embed microdata (especially the kind that can't be embedded already using $wgAllowMicrodataAttributes)." Would be useful to document such kind of microdata, on [[mw:Manual:$wgAllowMicrodataAttributes]]. Wikisource adds all sort of microdata by template, for what it's worth.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:13 AM
Aklapper removed a subscriber: wikibugs-l-list.