This function had been changed to unconditionally disable parentheses,
but none of its callers load the CSS needed to make that work.
Bug: T220767
Change-Id: I566d65e155258d3bd1a1a06bca9aa2b3a2d417ee
Follows-Up: I6eeeaa3b58d37adb7fefb4cc6915022229b3b324
Even if a revision has been deleted and the history-deleted class is
being used, the original class for its corresponding element when
not deleted should be applied. This is important as it allows skins
to skin consistently. "history-deleted" is a modifier class - it provides
further information on the original meaning.
This blocks styling the history page from core in Minerva skin
Bug: T216420
Change-Id: Ia659606838d7e38bc09054e36cd980b00f5e6da9
This patch removes the temporary rollback confirmation toggle that was
implemented to allow certain wikis to disable the rollback confirmation
feature while still showing the option in the user preferences.
For reference:
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/494249
Bug: T217437
Change-Id: I001d7927f6f44a4cc517a80b71f5b83aca33824c
This code is functionally identical, but less error prone (not so easy
to forget or mix these numerical indexes).
This patch happens to touch the Parser, which might be a bit scary. We
can remove this file from this patch if you prefer.
Change-Id: I8cbe3a9a6725d1c42b86e67678c1af15fbc5961a
Since the confirmation message can no longer show the edit count, remove
the data attribute that contains it.
Also make the selector for the confirmation more specific.
This is a followup for change 498096
Bug: T218354
Change-Id: I08dd75d3b161d7869357e486b25693dde635eb14
This change implements a temporary feature toggle for the rollback
confirmation change. The main purpose is to allow users of certain wikis
(de-wiki, pl-wiki, for example) to turn off this upcoming feature before
it is released to production.
Bug: T217039
Change-Id: I6ed59afde5b75756053da3ae46858304dda9317d
This change prepares a form for the RollbackAction to allow rollbacks to
be triggered via POST while also ensuring users are always prompted with
a request to confirm the rollback if the rollback confirmation prompt is
enabled.
Bug: T215303
Change-Id: Iaf7e095b3bb34072eea6bcac76ba29358b14cc09
Use the existing class mw-changeslist-links to visually separate
the user tools in CSS rather than in the HTML.
Bug: T205581
Change-Id: I024c8298ca5da753d96ec392be05d4530bb3ffa9
Previously, a manually constructed autocomment in the form of
/* [[Some link]] */
would create a link to the the section, and then the "Some link" page.
After T165189 was implemented, the entire autocomment is now a link to
the section, so we're creating links inside of a link...which is
problematic. In most contexts (history and watchlist particularly), the
section link is more important than the title in the section heading, so
that's what we'll favor here.
It's worth noting that this situation is a manually created edge case.
Even if the section heading is a wikilink, the edit summary will
autofill a section autocomment without the double brackets.
We'll now render the double brackets ([[...]]) and not link them. This
is what the user literally typed, and matches the existing practice of
rendering templates in section headings with their literal syntax. And
as a bonus, it's still possible for user scripts such as wikEdDiff to
turn the rendered double brackets into a real link if users want.
Bug: T165189
Change-Id: Ib10679edd76c72a60d7e1c89fc8454166e34c463
A follow-up to 0a8e16d7cf thanks to Anomie's code review.
The section title is now inside <span dir="auto"> and <span
class="autocomment">, as before. $wgLang->getDirMark() between the arrow
and the text was restored.
Given the comment
/* External links */ removed bogus entries
the HTML before 0a8e16d7cf looked like:
<a href="#External_links">→</a><span dir="auto"><span
class="autocomment">External links: </span> removed bogus entries</span>
after this change, it will look like:
<span dir="auto"><span class="autocomment"><a
href="#External_links">→External links</a>: </span> removed bogus
entries</span>
The issue of having links be inside other links will be addressed in a
separate patch.
Bug: T165189
Change-Id: I31d87a87ccaf50de58fdd0621c46133b2881b490
Per T205581#4768548 cached HTML might render a comment with
double brackets in the text. The CSS selector should not apply
there so a new class is used.
Using a BEM convention for the time being. This class can be
removed in future if needed.
Bug: T205581
Change-Id: If1552d6ddd4729b8beca45a1ca19ec6ce36e6118
From now on, the edit summary in ContribsPager results
will be wrapped in brackets via CSS pseudo elements.
Changes:
* Linker::revComment and Linker::commentBlock now accept a parameter which
can be used to disable wrapping in the text
* ContribsPager makes use of it
Bug: T205581
Change-Id: I60403a4a23d89107b7a28f0c12326d828a76614e
Previously, they were always displayed in defult language unless
forced explicitly in wikitext, e.g. [[File:Foo.svg|lang=ru]].
This change adds a feature flag that would enable always trying to
display in page language.
* If enabled, Parser will pass a new parameter - 'pagelang' - to
the media handler.
* SvgHandler uses page language when determining what language to
render the image in.
* 'pagelang' can always be overridden by 'lang'.
* If no translation in page language is available, the default
language (English) will be used for thumbnail URLs, to prevent
cluttering media storage and HTTP caches with useless copies.
Performance: this requires accessing image's metadata during parsing.
My testing indicates there were no code path where this wasn't the
case already, so no performance hit is expected, however we should
still keep an eye on page save performance.
Bug: T205040
Change-Id: I348840ef405e1370cc0c17d69051bce30153c9c0
It's not entirely clear from the documentation whether this method
returns wikitext or HTML, so make it explicit.
Change-Id: I094e370e921c43dd8c5dc4376b3dddd803665d90
Try to paste and preview this in the wikitext as well as the summary
line: [[:a]] [[ :a]]
The wikitext will show "a a", but the summary line will show "a :a".
This is only a display issue, all 4 links correctly link to the
article [[A]].
Change-Id: I08253a6d0b55b9aa3eace519bbdc1a456400bf84
This talks about references and values the way they worked in PHP 4.
Comment was added in r4927 (b025ad54) in 2004.
Change-Id: I58a74219665bed9e804d7c01f271fd96fd889072
This prevents some double escaped warnings. Requires
I2f4e33656b9f94 to be effective. Follow up faf2e14517.
Change-Id: I255c96592f3baff2df34e07c81510c8874908e28
Bug: T202797
The alignment parameter is totally safe (See the very convoluted
code in the parser) but its best practise to escape things right
before the output. Additionally this protects in case any extension
uses a hook to do anything silly.
Change-Id: Ie19b106409d55c704b69280e2d0e2bb29068bd2e
This should give more intuitive hints in assistive technology,
identical (or similar) to the hints for the JavaScript-generated
button we had before 68527cf479.
See results of testing with Windows Narrator/VoiceOver: T195053#4428563.
Bug: T195053
Change-Id: I9358b29f56ac1e43e9c5ed00d30ce6ffdf903299
This is a clarification of what already happens in practice for lists
generated from wikitext syntax, since that parsing happens
simultaneously.
Parsoid, for its part, does list handling prior to paragraph wrapping,
so must make use of these definitions.
Further, this helps reduce paragraph wrapping in interstitial spacing of
lists from HTML syntax, as spec'd in the tests, though the possibility
isn't eliminated entirely.
The TOC generation code is altered to reduce the number of newlines
emitted in between list items, since those are now left intact.
Change-Id: I6888b6e8e6768b0737565b87924fefa5a06ebd18
Changes in the behavior:
* The toggle button generate no FOUC on loading.
* On keyboard navigation the toggle key is the space key and not the
return key.
* Animation on hide and show is missing. Maybe a new animation with CSS
can added.
* The state of the button is not saved in a cookie.
* Self-build TOCs can not get hidden.
Browser support:
* The new implementation does not need JavaScript and therefor it works
on browser with disabled JavaScript and on Grade C browser.
* The new implementation requires the CSS pseudo-class selector
:checked. Therefor IE8 and lower are not supported.
Risks:
* The new implementation needs additional HTML elements. These elements
also get cached and crawled. The elements have no content so they get
hopefully ignored by crawler.
* The new CSS code imitates some styles (link, focus). This must kept
up to date.
* Multiple TOCs on one page would generate the same id attribute.
This can avoided by appending a counter or better and easier a random
string to the id attribute.
Bug: T195053
Change-Id: I82db33d656b3795d7134a91d20ed9d93a3471086
This allows extensions to essentially reimplement Linker#makeImageLink
completely. Before this wasn't 100% possible as these three are needed for
that.
Inspired by wikiHow's core hacks to /includes/Linker.php, which can now be
moved to an ImageBeforeProduceHTML hook subscriber. wikiHow uses those
changes together with the WikihowArticle extension to heavily modify the
article DOM for various extensions and the default skin.
Change-Id: I8b5ab42d9cf021d66b90d15be68a0239643c10e3