From 8213c0a67a7ef8740f19c8a15e5b14ae2acae88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org> Date: Thu, 11 Jun 2020 11:25:40 +0200 Subject: [PATCH] :ambulance: fix(core) Fix escaping of cookies warning message issue #6071 --- ihtml/themes/breezy/login.tpl | 2 +- ihtml/themes/legacy/login.tpl | 2 +- include/login/class_LoginPost.inc | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ihtml/themes/breezy/login.tpl b/ihtml/themes/breezy/login.tpl index 3b39193d2..754d858fe 100644 --- a/ihtml/themes/breezy/login.tpl +++ b/ihtml/themes/breezy/login.tpl @@ -53,7 +53,7 @@ if (document.cookie.indexOf( "fdtest=") > -1 ) document.cookie = "fdtest=empty;path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT"; else - document.write("{$cookies}"); + document.write("<b>{t}Warning{/t}</b> {t}Your browser has cookies disabled. Please enable cookies and reload this page before logging in!{/t}"); --> </script> </p> diff --git a/ihtml/themes/legacy/login.tpl b/ihtml/themes/legacy/login.tpl index 349b312d3..3cf3a9f54 100644 --- a/ihtml/themes/legacy/login.tpl +++ b/ihtml/themes/legacy/login.tpl @@ -53,7 +53,7 @@ if (document.cookie.indexOf( "fdtest=") > -1 ) document.cookie = "fdtest=empty;path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT"; else - document.write("{$cookies}"); + document.write("<b>{t}Warning{/t}</b> {t}Your browser has cookies disabled. Please enable cookies and reload this page before logging in!{/t}"); --> </script> </p> diff --git a/include/login/class_LoginPost.inc b/include/login/class_LoginPost.inc index a90d33138..6389fb88c 100644 --- a/include/login/class_LoginPost.inc +++ b/include/login/class_LoginPost.inc @@ -84,9 +84,6 @@ class LoginPost extends LoginMethod } } - /* Translation of cookie-warning. Whether to display it, is determined by JavaScript */ - $smarty->assign('cookies', '<b>'._('Warning').':</b> '._('Your browser has cookies disabled. Please enable cookies and reload this page before logging in!')); - static::displayLogin(); } -- GitLab