Go to file
Bartosz Dziewoński 203a4dcb42 Use 'id' attributes rather than heading text for edit autosummaries
Ideally the edit autosummary would be generated in the same
way as in the old wikitext editor: from the wikitext of the
heading. But on the JS side, we don't have access to the
wikitext, or to the PHP method that generates autosummaries.

This might seem crazy at first, but ultimately the point of
the autosummaries is to link to the section heading by its
'id' attribute, so it is perfectly reliable.

Doing it this way depends on $wgFragmentMode being set to
[ 'html5', 'legacy' ] or [ 'html5' ], otherwise the escaped IDs
are super garbled (particularly in non-Latin-alphabet languages)
and can't be unescaped reliably. Conveniently, we already
require that since 9ee0fd69f5.

Bug: T264561
Bug: T266725
Change-Id: I7d35098d672d0edb50d49e22de1686d5cc83b60e
2020-11-05 15:13:08 +00:00
.phan build: Add mediawiki/mediawiki-phan-config 2020-06-10 22:21:07 +02:00
i18n Localisation updates from https://translatewiki.net. 2020-11-05 08:28:38 +01:00
images Add beta feature preference 2020-02-21 15:20:48 +00:00
includes Use 'id' attributes rather than heading text for edit autosummaries 2020-11-05 15:13:08 +00:00
maintenance Defensive use of dynamic paths in maintenance script 2020-02-20 19:51:07 +01:00
modules Use 'id' attributes rather than heading text for edit autosummaries 2020-11-05 15:13:08 +00:00
tests Move warnings stuff from CommentItem to ThreadItem 2020-11-02 20:07:23 +00:00
.eslintrc.json build: Update devDependencies 2020-06-09 19:42:05 +01:00
.gitignore Remove extra blank line from .gitignore file 2020-08-31 15:24:56 +01:00
.gitreview
.phpcs.xml build: Updating mediawiki/mediawiki-codesniffer to 32.0.0 2020-10-29 10:53:01 +00:00
.stylelintrc.json build: Updating mediawiki/mediawiki-codesniffer to 29.0.0 2020-01-14 04:55:38 +00:00
CODE_OF_CONDUCT.md build: Updating npm dependencies 2020-01-09 06:43:15 +00:00
composer.json build: Updating mediawiki/mediawiki-codesniffer to 33.0.0 2020-11-03 17:39:19 +00:00
COPYING
extension.json Enable DT server side via a cookie to preserve user enable hack 2020-10-19 21:42:58 +01:00
Gruntfile.js build: Update devDependencies 2020-06-09 19:42:05 +01:00
package-lock.json build: Update eslint-config-wikimedia to 0.17.0 2020-08-26 23:46:34 +01:00
package.json build: Update eslint-config-wikimedia to 0.17.0 2020-08-26 23:46:34 +01:00