In certain cases the parser could go back rather than forward after
finding a signature, causing it to find the same signature forever
until it ran out of memory.
Test cases coming later in a separate patch.
Bug: T356884
Change-Id: I8ac72b05e5e4ed45e6119c012a69708c9d8eda29
Follow-up to 8a8c7270cf.
I think this wasn't working becase we were doing it in the wrong
order (reply tool initialization would disable toggling section
state before toggler toggled it open).
Bug: T338920
Change-Id: I7ed3d5c149ddb3d33cb67010f032c63e175687f2
* Keep the information about this in the API result, which we were
previously omitting
* Use it instead of duplicating the logic client-side
Bug: T356131
Change-Id: I7e7342e9d94a171b5ef56e646871c18c8c39c44c
`decodeURI( fragment )` can throw if the fragment isn't correctly
encoded – e.g. when it's just '#%'.
Use mw.util.percentDecodeFragment() instead, which uses a more
resilient algorithm.
Change-Id: I8447771ad2ae33da52b71d4127981dd8a2018a7d
In production, indexing the full history of every page will take
too long, so we can't rely on being able to find the target heading
text in the history of the current page.
When this search fails, fall back to the following searches:
* The heading appears in the current revision of a sub-page
* The heading appears anywhere on the wiki, but only once
Bug: T356276
Change-Id: I90e92cb9c85aaf6fb2355f842450981bbe6abf2d
Section titles containing non-ASCII characters were being passed through
URL-encoded, resulting in no results being found.
Bug: T356199
Change-Id: Iac56ee434a37baf3d170aec992d2f2d8679b6f1f
This will be present in parser cache output and can
sometimes be mistaken for user page links.
Bug: T356142
Change-Id: I800b23d8466f72affcadfa336aab07abf7f8d79e
This reuses the existing comment parser code in HookUtils and makes the
DataUpdatesHooks and EventDispatcher code consistent.
Bug: T354792
Change-Id: I58a71b26b3f47898a68a29098a8105ee844403dd
This reverts commit 1cf6000d18.
Reason for revert: Want to do another round of visual diff testing
on wikitech as an anonymous user. Will revert this after test is done.
Change-Id: Ic3facb7ecd9c932be348d47d6a38cff71cd7e1db
results[ 0 ] would be undefined, causing a later JS error before the
toast could be shown.
Bug: T355165
Change-Id: Ia591a1e4db0acfa377201c355938a32f680393ce
This prevents an exception being thrown if you open the
new topic tool when a reply widget is still loading.
Change-Id: I17da48ddf91394d05cc82613ce5517f1e176750b
Also rename CommentController#teardown to onReplyWidgetTeardown,
and NewTopicController#clear(Storage) to onReplyWidgetClear(Storage).
Change-Id: Ib1dd50ca69aac6f1836674d1a6aefa2402844c57
We shouldn't assume callers of this method have waited
for the replyWidget to be built.
Bug: T354292
Change-Id: Ic66b4f04b8786b07f520e329adda37efcf498dad