template: Avoid raw HTML parameter for jump link labels

Change-Id: I6c638118988b6fbea95697817edf8c59c0ef6a6b
This commit is contained in:
Timo Tijhof 2019-01-22 19:34:01 -08:00
parent 9cc0ca983c
commit d306e07824
2 changed files with 4 additions and 5 deletions

View file

@ -79,9 +79,8 @@ class VectorTemplate extends BaseTemplate {
// From Skin::getNewtalks(). Always returns string, cast to null if empty.
'html-newtalk' => $this->get( 'newtalk', '' ) ?: null,
// TODO: Use text() instead of escaped() for these two simple messages.
'html-msg-jumptonavigation' => $this->getMsg( 'vector-jumptonavigation' )->escaped(),
'html-msg-jumptosearch' => $this->getMsg( 'vector-jumptosearch' )->escaped(),
'msg-jumptonavigation' => $this->getMsg( 'vector-jumptonavigation' )->text(),
'msg-jumptosearch' => $this->getMsg( 'vector-jumptosearch' )->text(),
// Result of OutputPage::addHTML calls
'html-bodycontent' => $this->get( 'bodycontent' ),

View file

@ -17,8 +17,8 @@
using this place to insert extra elements before.
}}
<div id="jump-to-nav"></div>
<a class="mw-jump-link" href="#mw-head">{{{html-msg-jumptonavigation}}}</a>
<a class="mw-jump-link" href="#p-search">{{{html-msg-jumptosearch}}}</a>
<a class="mw-jump-link" href="#mw-head">{{msg-jumptonavigation}}</a>
<a class="mw-jump-link" href="#p-search">{{msg-jumptosearch}}</a>
{{{html-bodycontent}}}
{{#html-printfooter}}
<div class="printfooter">{{{html-printfooter}}}</div>