mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Escape HTML tags in Notifications (Linux)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
05148b6e93
commit
99923b7b8f
@ -81,6 +81,15 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
}
|
||||
|
||||
displayNotification(title: string, msg: string, avatarUrl: string, room: Object): Notification {
|
||||
|
||||
// GNOME notification spec parses HTML tags for styling...
|
||||
// Electron Docs state all supported linux notification systems follow this markup spec
|
||||
// https://github.com/electron/electron/blob/master/docs/tutorial/desktop-environment-integration.md#linux
|
||||
// maybe we should pass basic styling (italics, bold, underline) through from MD
|
||||
if (window.process.platform === 'linux') {
|
||||
msg = msg.replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
||||
|
||||
// Notifications in Electron use the HTML5 notification API
|
||||
const notification = new global.Notification(
|
||||
title,
|
||||
|
Loading…
Reference in New Issue
Block a user