Page MenuHomePhabricator

Add Wikitext capabilities to cookiewarning-info for Extension:CookieWarning
Open, Needs TriagePublic

Description

Currently MediaWiki:Cookiewarning-info is used by MediaWiki-extensions-CookieWarning to load the text shown in the Cookie policy warning. The file is only loaded as text and is not parsed as wikitext. This is unfortunate because often it would be necessary to exclude this banner from search results (SEO) [1] or to add multiple links or other styling.

Feature request: We would like to have an option which can be set in LocalSettings.php, so that cookiewarning-info is not loaded as text, but parsed as wikitext.

This might be as easy as conditionally changing https://github.com/wikimedia/mediawiki-extensions-CookieWarning/blob/a0dd30acebab01f1fa8524ad50953c94d77a30d9/includes/Hooks.php#L122 to:

Html::rawElement(
    'span',
    [],
    $skin->msg( 'cookiewarning-info' )->parse()
)

A configuration option might be unnecessary because the MediaWiki: namespace is restricted by default anyhow.

Would a patch be welcome in any form?


[1] Some search results contain only or parts of the cookie banner text, which isn't helpful for users reading search results.