This became a special case when decodeURIComponentIntoArticleTitle()
was introduced, presumably because we skipped underscore transformation
out of laziness here. It doesn't matter whether we do underscore normalization
because we do title normalization right after, so make this code
less exceptional by using the fully decoded title.
Change-Id: I036cc7f1e08895d36224c94b8edc3ad700af1947
<a href="Foo%3F"> would dirty-diff to <a href="Foo?"> and also render
as such, pointing to the wrong page.
We also called decodeURIComponent() on the href twice, which can't
have been good.
Move URI decoding and underscore normalization into
getTargetDataFromHref(), and add rawTitle for callers that need it.
Put rawTitle in the origTitle attribute, so that equivalence
comparisons (decode(origTitle) === title) work as intended.
Bug: T145978
Change-Id: I29331a4ab0f8f7ef059c109f6813fa670a2c7390
This replaces ve.safeDecodeURIComponent(...).replace( /_/g, ' ' ) . This action
is really specific to the quirks of mediawiki title processing.
Change-Id: Ia9e525c9340e6de9e485355899996c97867ccb48
For now just use the rules file in lib/ve, but eventually
this will be a preset.
Change-Id: I7fd79d3e1dce37aef066d416cd969e5fff1e962f
Depends-On: I17e0d23ddfedf64985495ab35d113ea08c03b1df
Make some of the methods we currently use to render the node
static so we can re-use them before inserting. We do the evaluation
without inserting the node so as not to dirty the document and
transcation history.
In the unlikely case the request fails, just fallback to inline.
This only handles insertions for now as type changes on edit will be
very rare.
This changes the signature of insertTransclusionNode, which is used
in Cite and Citoid extensions.
Bug: T51784
Change-Id: Ibc2fc66e6866084b0a4deeb082c8a1ca412febb2
New changes:
0b7e689 FindAndReplaceDialog: don't use tabindex
17b10a5 Localisation updates from https://translatewiki.net.
a4133e4 [BREAKING CHANGE] Make whitespaceHtmlCharacters a real static property
Local changes:
* MWEntityNode: Fix lookup of whitespaceHtmlCharacters
Property is now in 'static', and use registry to look up
TextNode by symbolic name.
Change-Id: Ied8c0c6feb69141c7c53fc4cc790774dee2cb63c
Depends-On: I7537b46a9fd58dfb2bd18dc4ed469aa221b96e86
The DM side already had the mixin, the CE side was still using custom
logic that has since been moved to ce.ClassAttributeNode.
This fixes the issue of tables not getting the wikitable class in VE
as it was only applied on attribute change previously, which never happened.
Change-Id: I197347762fc9228034f7664484539e5888722bcf
VisualEditor is usually not enabled in talk namespaces... but
sometimes it is. And when users see the button to edit with VE,
they're going to click it and expect to be able to sign their posts.
This tool is only loaded on talk pages and pages in additional
namespaces defined in $wgExtraSignatureNamespaces.
Code adapted with small tweaks from my own gadget
<https://meta.wikimedia.org/wiki/User:Matma_Rex/visualeditor-signature.js?oldid=13461327>,
which is already available under the MIT license.
Changes include:
* The tool is now always visible if the wiki allows signatures in any
VE namespaces, but disabled when not allowed in the current namespace.
* Register '~~~~' sequence to insert the signature.
* Code style tweaks for stricter lint checks in this repository.
* Documentation corrections.
Swedish translation provided by André Costa (already credited
as a translator as Lokal_Profil).
Depends on changes in VisualEditor core:
* I89fe53890ab59d12260ea6b41de802c38c24e8b9
* I14cd7efac521687ea38580341ae08ddc522edeeb
Bug: T53154
Change-Id: I6be5fb2118cf3eef5098d4c5320228aa81411ccb
MWExtensionNodes currently don't call afterRender if the image
is already loaded, which can happen if we decide not to rerender
after an update (e.g. when the response is an error).
Change-Id: Ic9c11e446a7cc789bb20680466709ff2ad5cb22e
Add zero-width space to make span-like tags non-empty, so that the browser won't
merge their cursoring positions with the following character.
ve.ce.MWNumberedExternalLinkNode:
* Insert U+200B ZERO WIDTH SPACE inside span (before 'a' tag).
Bug: T96307
Change-Id: Ib07f732043eae4640e3dcfdc06015bcf8897c7b4
Implement a special node type, context item, and inspector for
ISBN/PMID/RFC magic links. Add buttons to the link inspectors
to convert back and forth between "simple" links, and magic links.
Depends on I5d000d8b63dafdfe0a2753069d3f0ac5b03b8829 in Parsoid
for clean round-tripping of localized ISBN magic links.
Bug: T63558
Change-Id: Id5b7a2ae3c80b0e5eed598f0bd024d3e94f7e9aa