messageTray: Remove _fixMarkup() function
Commit053e54f944
copied it to calendar, and since commit15e42c4d5
, the original is no longer used.
This commit is contained in:
@ -69,26 +69,6 @@ const Urgency = {
|
||||
CRITICAL: 3
|
||||
};
|
||||
|
||||
function _fixMarkup(text, allowMarkup) {
|
||||
if (allowMarkup) {
|
||||
// Support &, ", ', < and >, escape all other
|
||||
// occurrences of '&'.
|
||||
let _text = text.replace(/&(?!amp;|quot;|apos;|lt;|gt;)/g, '&');
|
||||
|
||||
// Support <b>, <i>, and <u>, escape anything else
|
||||
// so it displays as raw markup.
|
||||
_text = _text.replace(/<(?!\/?[biu]>)/g, '<');
|
||||
|
||||
try {
|
||||
Pango.parse_markup(_text, -1, '');
|
||||
return _text;
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// !allowMarkup, or invalid markup
|
||||
return GLib.markup_escape_text(text, -1);
|
||||
}
|
||||
|
||||
const FocusGrabber = new Lang.Class({
|
||||
Name: 'FocusGrabber',
|
||||
|
||||
|
Reference in New Issue
Block a user