gnome-shell/js/misc
Sebastian Keller 3d8b866a9d util: Properly handle markup in highlighter
The code to highlight matches did not properly escape the passed in text
as for markup before adding its highlighting markup. This lead to some
search result descriptions not showing up, because their descriptions
contained characters, such as "<", that would have to be escaped when
used in markup or otherwise lead to invalid markup.

To work around this some search providers wrongly started escaping the
description on their end before sending them to gnome-shell. This lead
to another issue. Now if the highlighter was trying to highlight the
term "a", and the escaped description contained "&apos;", the "a" in
that would be considered a match and surrounded by "<b></b>". This
however would also generate invalid markup, again leading to an error
and the description not being shown.

Fix this by always escaping the passed in string before applying the
highlights in such a way that there are no matches within entities.

This also means that search providers that escaped their description
strings will now show up with the markup syntax. This will have to be
fixed separately in the affected search providers.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4791
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2033>
2021-12-22 16:47:18 +00:00
..
config.js.in build: Add soup2 option 2021-09-01 12:26:15 +02:00
extensionUtils.js extensionUtils: Add gettext convenience helpers 2021-08-14 18:45:25 +00:00
fileUtils.js cleanup: Replace non-standard ByteArray module 2021-09-01 14:49:30 +00:00
gnomeSession.js endSessionDialog: Only show logout inhibiting apps 2021-02-24 15:31:03 +00:00
history.js history: Trim input and ignore if empty 2021-02-13 08:58:20 +00:00
ibusManager.js
inputMethod.js inputMethod: Do not reset invisible preedit on focus_out 2021-11-01 17:02:50 +00:00
introspect.js util: Wait for initial name owners in DBusSenderCheck before checking 2021-12-04 16:57:25 +00:00
jsParse.js
keyboardManager.js keyboard: Fix display keyboard layout crash with some input methods 2021-03-29 09:33:45 +00:00
loginManager.js screenShield: Asyncify _syncInhibitor() 2021-08-16 02:44:36 +02:00
meson.build build: Add soup2 option 2021-09-01 12:26:15 +02:00
modemManager.js cleanup: Define GObject accessors in camelCase 2021-02-03 20:19:29 +01:00
objectManager.js
params.js
parentalControlsManager.js
permissionStore.js
smartcardManager.js
systemActions.js cleanup: Define GObject accessors in camelCase 2021-02-03 20:19:29 +01:00
util.js util: Properly handle markup in highlighter 2021-12-22 16:47:18 +00:00
weather.js Update links to use HEAD instead of master 2021-07-18 21:45:46 +00:00