public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
Fixed footer escaping
702ed85d
data/web/inc/header.inc.php | 6 +++++-
data/web/js/build/013-mailcow.js | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
Diff
diff --git a/data/web/inc/header.inc.php b/data/web/inc/header.inc.php
index 9ab2ad17..d2ce6f3d 100644
--- a/data/web/inc/header.inc.php
+++ b/data/web/inc/header.inc.php
@@ -62,7 +62,11 @@ if ($app_links_processed){
}
}
-
+// Workaround to get text with <br> straight to twig.
+// Using "nl2br" doesn't work with Twig as it would escape everything by default.
+if (isset($UI_TEXTS["ui_footer"])) {
+ $UI_TEXTS["ui_footer"] = nl2br($UI_TEXTS["ui_footer"]);
+}
$globalVariables = [
'mailcow_hostname' => getenv('MAILCOW_HOSTNAME'),
diff --git a/data/web/js/build/013-mailcow.js b/data/web/js/build/013-mailcow.js
index 53e48d60..d897f23e 100644
--- a/data/web/js/build/013-mailcow.js
+++ b/data/web/js/build/013-mailcow.js
@@ -48,7 +48,11 @@ $(document).ready(function() {
})
}
$(".rot-enc").html(function(){
- return str_rot13($(this).text())
+ footer_html = $(this).html();
+ footer_html = footer_html.replace(/</g, '<').replace(/>/g, '>')
+ .replace(/&/g, '&').replace(/&nzc;/g, '&')
+ .replace(/"/g, '"').replace(/'/g, "'");
+ return str_rot13(footer_html)
});
// https://stackoverflow.com/questions/4399005/implementing-jquerys-shake-effect-with-animate
function shake(div,interval,distance,times) {