Commit 0d6d564d authored by thaider's avatar thaider
Browse files

use HtmlArmor for SkinEditSectionLinks, fixes #154

parent ccb5ce9a
......@@ -157,3 +157,25 @@ div.tleft {
body.mw-hide-empty-elt .mw-empty-elt {
display: none;
}
/* Display editsection links smaller and next to headings */
.mw-editsection,
.mw-editsection-like {
font-size: small;
font-weight: normal;
margin-left: 1em;
vertical-align: baseline;
/* Reset line-height; headings tend to have it set to larger values */
line-height: 1em;
}
/* Correct directionality when page dir is different from site/user dir */
/* @noflip */
.mw-content-ltr .mw-editsection,
.mw-content-rtl .mw-content-ltr .mw-editsection {
margin-left: 1em;
}
/* @noflip */
.mw-content-rtl .mw-editsection,
.mw-content-ltr .mw-content-rtl .mw-editsection {
margin-right: 1em;
}
......@@ -948,7 +948,12 @@ class TweekiHooks {
$icon = wfMessage( 'tweeki-editsection-icon' )->inLanguage( $lang )->parse();
$text = wfMessage( 'tweeki-editsection-text' )->inLanguage( $lang )->parse();
$class = wfMessage( 'tweeki-editsection-class' )->inLanguage( $lang )->parse();
$text = $icon . ( ( $icon != '' ) ? ' ' : '' ) . $text;
if( version_compare( MW_VERSION, '1.34', '>=' ) ) {
$text = new HtmlArmor( $icon . ( ( $icon != '' ) ? ' ' : '' ) . $text );
} else {
$text = $icon . ( ( $icon != '' ) ? ' ' : '' ) . $text;
}
$links['editsection']['text'] = $text;
$links['editsection']['attribs']['class'] = $class;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment