mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-23 13:56:53 +00:00
Use \u{00A0} instead of   or
Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0) instead of the HTML/XML entitiy  . Also use \u{1F36A} instead of 🍪 for Unicode Character 'COOKIE' (U+1F36A). Bug: T154300 Change-Id: I13536589a4c183215785fe3352f4fc081571451b
This commit is contained in:
parent
fe6ac7c3af
commit
42fca811c6
|
@ -71,7 +71,7 @@ class Hooks {
|
|||
$moreLink = self::getMoreLink();
|
||||
|
||||
if ( $moreLink ) {
|
||||
$moreLink = ' ' . Html::element(
|
||||
$moreLink = "\u{00A0}" . Html::element(
|
||||
'a',
|
||||
[ 'href' => $moreLink ],
|
||||
$sk->msg( 'cookiewarning-moreinfo-label' )->text()
|
||||
|
@ -91,9 +91,11 @@ class Hooks {
|
|||
) .
|
||||
Html::closeElement( 'form' );
|
||||
|
||||
$cookieImage = Html::openElement( 'div', [ 'class' => 'mw-cookiewarning-cimage' ] ) .
|
||||
'🍪' .
|
||||
Html::closeElement( 'div' );
|
||||
$cookieImage = Html::element(
|
||||
'div',
|
||||
[ 'class' => 'mw-cookiewarning-cimage' ],
|
||||
"\u{1F36A}"
|
||||
);
|
||||
|
||||
$isMobile = ExtensionRegistry::getInstance()->isLoaded( 'MobileFrontend' ) &&
|
||||
MobileContext::singleton()->shouldDisplayMobileView();
|
||||
|
|
|
@ -98,21 +98,21 @@ class HooksTest extends MediaWikiLangTestCase {
|
|||
'http://google.de',
|
||||
false,
|
||||
false,
|
||||
' <a href="http://google.de">More information</a>',
|
||||
"\u{00A0}<a href=\"http://google.de\">More information</a>",
|
||||
],
|
||||
[
|
||||
true,
|
||||
'',
|
||||
'http://google.de',
|
||||
false,
|
||||
' <a href="http://google.de">More information</a>',
|
||||
"\u{00A0}<a href=\"http://google.de\">More information</a>",
|
||||
],
|
||||
[
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'http://google.de',
|
||||
' <a href="http://google.de">More information</a>',
|
||||
"\u{00A0}<a href=\"http://google.de\">More information</a>",
|
||||
],
|
||||
// the config should be the used, if set (no matter if the messages are used or not)
|
||||
[
|
||||
|
@ -120,21 +120,21 @@ class HooksTest extends MediaWikiLangTestCase {
|
|||
'http://google.de',
|
||||
false,
|
||||
'http://google123.de',
|
||||
' <a href="http://google.de">More information</a>',
|
||||
"\u{00A0}<a href=\"http://google.de\">More information</a>",
|
||||
],
|
||||
[
|
||||
true,
|
||||
'http://google.de',
|
||||
'http://google1234.de',
|
||||
'http://google123.de',
|
||||
' <a href="http://google.de">More information</a>',
|
||||
"\u{00A0}<a href=\"http://google.de\">More information</a>",
|
||||
],
|
||||
[
|
||||
true,
|
||||
'',
|
||||
'http://google.de',
|
||||
'http://google123.de',
|
||||
' <a href="http://google.de">More information</a>',
|
||||
"\u{00A0}<a href=\"http://google.de\">More information</a>",
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue