From 6ba3b7c8be51ecb1fd1d80883d9768a758e84a4c Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Mon, 27 Apr 2026 21:14:18 +0300 Subject: [PATCH] Fix opening links with noreferrer rel="noreferrer" has the same effect as rel="noopener", but also prevents the Referer header from being sent to the new page. [https://mui.com/material-ui/react-link/#security] If this feature is set, the browser will omit the Referer header, as well as set noopener to true. [https://developer.mozilla.org/en-US/docs/Web/API/Window/open#noreferrer] --- web/src/app/utils.js | 2 +- web/src/components/Notifications.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/app/utils.js b/web/src/app/utils.js index d6467eb7..a43a9e03 100644 --- a/web/src/app/utils.js +++ b/web/src/app/utils.js @@ -178,7 +178,7 @@ export const formatPrice = (n) => { }; export const openUrl = (url) => { - window.open(url, "_blank", "noopener,noreferrer"); + window.open(url, "_blank", "noreferrer"); }; export const sounds = { diff --git a/web/src/components/Notifications.jsx b/web/src/components/Notifications.jsx index ca07847d..3b134abc 100644 --- a/web/src/components/Notifications.jsx +++ b/web/src/components/Notifications.jsx @@ -164,7 +164,7 @@ const autolink = (s) => { const parts = s.split(/(\bhttps?:\/\/[-A-Z0-9+\u0026\u2019@#/%?=()~_|!:,.;]*[-A-Z0-9+\u0026@#/%=~()_|]\b)/gi); for (let i = 1; i < parts.length; i += 2) { parts[i] = ( - + {shortUrl(parts[i])} );