Commit 28191bb3 authored by thaider's avatar thaider
Browse files

use HtmlArmor for SkinEditSectionLinks, fixes #154

parent 7654c9f1
......@@ -874,7 +874,11 @@ 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;
......
......@@ -144,3 +144,26 @@ div.tright {
div.tleft {
margin: .5em 1.4em 1.3em 0;
}
/* 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;
}
Supports Markdown
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