This reverts commit 760641e180.
Reason for revert: it was a quick fix, has been fixed properly in core
instead in I907c22ef070616d81b9a50b0e807a7b8f78b59b5.
Bug: T357668
Change-Id: I4ec440c1e326419a8be5457b79c5374316755a53
Set hyperlink 'target' attribute to $wgExternalLinkTarget.
In addition, set the 'rel' attribute according to the
$wgNoFollowLinks, $wgNoFollowDomainExceptions
and $wgNoFollowNsExceptions settings (bug T186241).
Bug: T356730
Change-Id: If4880e4e0b3cd2056521d44baf261ed848511bcd
* The previously failing Parsoid test now passes.
Bug: T311523
Depends-On: Id7d9e82ee4ff20a79ba1a5b2433fa29bc5f76e68
Change-Id: I03115b91fd781b72f0bf2c66cb6c18963a772dab
* Parsoid currently fails this and the failing test has been
added to the known failure list. A follow-up patch will fix it.
Change-Id: Ic788340ec073b401e3e921339250a2678ea038da
Also set @phan-var to handle nullable parentNode
DOMNode::$parentNode is documented as nullable in php8.1
DOMElement::getAttribute is documented to return string in php8.1
Reported by phan running under php8.1
Change-Id: Ia4abd7bf03bc52d7d4ba2c69738bb90c55d01a2b
These will be updated in I84296d802382131b47fda097878df43e2f6f46ff
but we need to break a cyclic dependency.
Change-Id: I1842447492361fd9eb870b2573eaa50c51cf24fc
* This replaces the standalone tests that we ran for the Parsoid
implementation while it lived in the Parsoid repo.
* There is no benefit running html2wt (and hence html2html) tests
at this point since html2wt simply uses data-mw information.
Change-Id: I9435267f654eb07bcb1b5733986667a8617f1fbd
* There have been no changes to the code except for:
- class is now called ParsoidImageMap with a matching file name
- the namespace is changed to MediaWiki\Extension\ImageMap.
- adding phan directives to deal with Parsoid's DOM proxies
which phan doesn't seem to be see here.
* Parsoid's SiteConfig extension registration code simply overwrites
the extConfig array for a tag name. So, keeping the config and
implementation identical ensures that no matter which version of
code is registered (based on load order), we get the same behavior.
* Once this rolls out on the next train, we can remove the code
from Parsoid.
* Future patches might refactor the two implementations to extract
common functionality or merge code into a single file.
Change-Id: I6cffa4420d2daa70174fa926d5c7a4d983792969
The approach taken here is the same as in core for magnify links on
thumbs in Id46d1b2ab1af3baebff13e10f1485f3cfd9a4b37
The gist is that resource attributes are added on the mw-file-element so
that the necessary url is present in the html. A class is also added to
the wrapper element that designates where the link should be positioned.
Finally, a script adds the link which styles in appropriately.
Bug: T329364
Depends-On: Id46d1b2ab1af3baebff13e10f1485f3cfd9a4b37
Change-Id: I20130fd39135dfd5074590ee9c2b6e01693384e4
This was added in Ic0169d3914c5ce442b063f4bbbb6493966dbb302 and it
looks wrong on a few levels: the format isn't captured, and only
mw:File is emitted now.
Change-Id: I5aff7b53348696c485ef5683f6aab7aaafac4973