Various checks didn't think a rel attribute could contain multiple values.
Mostly they don't, but to play it safe let's adjust the checks.
Change-Id: I29823b7c8c65ef6b2ff41ce9a801840000972e9c
Depends-On: I33a456351ab025d0c81cfb1a1577d5a2ae9df51a
New changes:
7551f6c66 [BREAKING CHANGE] Rename class ve.dm.IndexValueStore->ve.dm.HashValueStore
Local changes:
Follow-through rename of IndexValueStore->HashValueStore
Bug: T188900
Change-Id: If60d0c637fe92f0e7afe916c064fafb17980d063
Let's keep the ugly regexp and the comments about why we do this in a
single place.
This is mostly without behavior changes, with three exceptions:
* ve.dm.MWImageModel#attachScalable now passes a title with spaces
instead of underscores to the Scalable (this doesn't matter because
it's normalized to use spaces later anyway).
* ve.dm.MWImageNode#getFilename now returns a title with spaces
instead of underscores. This is used in some API queries and when
rendering thumbnails for missing files, and this format is actually
more correct for both of these.
* ve.dm.MWTemplateModel now URI-decodes the template title. This
actually fixes a bug where trying to edit a template transclusion
whose title contains a '?' would throw an exception about invalid
title.
Also, clarify that the return value of ve.dm.MWImageModel#getFilename
and ve.dm.MWImageNode#getFilename is different :(
Change-Id: I8e09015cea82308017ed925ec755b7231518126e
Original title will preserve the case of what the user entered
into the inspector. Noramlized title will remove any unwanted
leading colons from file/category links.
Bug: T118408
Bug: T124410
Bug: T160977
Change-Id: I92ffc19eab4eead0d124e84afc1e5a0a3e535867
<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
New changes:
14b5fbc [BREAKING CHANGE] Move originalDomElements to the IV store and use MD5
c5d21f0 Provide methods to (de)serialize transactions
Local changes to move originalDomElements to IV store
Depends-On: I8a71c1a40ec35108d0a9a388da6f75632f8dc53c
Depends-On: I32c9b5f984fcf96e3354841ecfcd444149e8f159
Change-Id: I0fbb6324eede94558426178cbdad6b5daf0f8318
TODO: Do we need to do anything special here to handle multiple hash symbols in a URL?
Bug: T112898
Change-Id: I4773cb04ae2533e8125bc55d9ebb606d63b3bf48
This replaces ve.safeDecodeURIComponent(...).replace( /_/g, ' ' ) . This action
is really specific to the quirks of mediawiki title processing.
Change-Id: Ia9e525c9340e6de9e485355899996c97867ccb48
Percent-encoded characters are forbidden in titles. Copying URLs around will
tend to wind up when them percent-encoded when you paste. Therefore, when
trying to build a title from a pasted link, decode it first.
Change-Id: Ia0abcb2d903b04d99c7db16eb0a5962480b138d5
We now accept non-Parsoid generated external links from paste,
so make sure they have href attributes otherwise they aren't
really external links and will throw exceptions later on.
Bug: T131430
Change-Id: Ifb565b1ce30cfe80ae72b17f6a9551ea40b36453
Using the same logic we used for converting pasted URLs, detect
internal links by matching their base.
Currently link pasting is still disabled in the VE target, but
has been enabled elsewhere (Flow).
Change-Id: Iebd61abbe1fe82fd18d129e1dbc815ca75f44e87
Now that some targets support link pasting (Flow) we need to
make sure that pasted links match to an allowed type ('link/mwExternal')
instead of plain 'link' annotations which should never exist
in an MW document.
In a later commit we should auto-detect internal links.
Change-Id: I7faae834aa6e730c3cf93a691331a05fd0fe3d5c
This was causing a regression in the behaviour that takes you
to the external link tab automatically when 'http://' is typed,
as internally it is normalised to 'Http://'.
Bug: T112158
Change-Id: Id7cff07e89caafe5b350f4fb27b99c6c89498990
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
This allows the URL paste handler to use the normalized title
as the text content. Add a test to cover this behaviour.
Depends on Ica48fea69cc in core.
Bug: T109980
Change-Id: I2784adaf2949a73256049921227dde0917ef9aef
Add ve.dm.MWInternalLinkAnnotation.static.newFromTitle to build an
appropriate internal link annotation from a mw.Title. Tweaked some
method signatures to avoid repeated reparsing of the title text.
Also refactor ve.dm.MWInternalLinkAnnotation.static.getTargetDataFromHref
to explicitly return a boolean indicating whether the result was determined
to be an internal link.
Bug: T64816
Change-Id: I74385d7b3ede1794398dabb749185f4080509b99
Currently we compare some HTML attributes, but as wikitext doesn't
allow you to set arbitrary attributes on a link they can never
represent a meaningful difference (unlike <b style="color:red;"> vs. <b>)
Bug: T95028
Change-Id: I267604e4b2140d3c4fe4f9ab07961c6f17a1f2fa
New changes:
0ceafd5 Fix V8 deopt for ve.ce.BranchNode#onSplice
01d2d4b [BREAKING CHANGE] Store originalDomElements instead of htmlAttributes
96005a7 Localisation updates from https://translatewiki.net.
42e672e ve.ui.Toolbar: Don't call #updateToolState from #initialize
373562d Localisation updates from https://translatewiki.net.
Local changes:
Update for htmlAttributes going away
Change-Id: I576a1e5d5883b03d1fff6666926f80a5682a280f
Only template nodes for now. Not sure what we can do about generated content nodes in general...
Bug: 65353
Change-Id: I848f36764b446ed30c74c0e641d0973008f6880b
Also cleanup redundant overrides, documentation and
unused messages.
Depends on If22a5197 in core.
Change-Id: I533235f4eb5d703783a8fb45dff5e7be465f4ebb