mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-12-15 10:55:59 +00:00
Merge pull request #6782 from patschi/fix-footer-escape
Fixed wrong footer escaping for certain characters
This commit is contained in:
@@ -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 = [
|
$globalVariables = [
|
||||||
'mailcow_hostname' => getenv('MAILCOW_HOSTNAME'),
|
'mailcow_hostname' => getenv('MAILCOW_HOSTNAME'),
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ $(document).ready(function() {
|
|||||||
$.notify({message: msg},{z_index: 20000, delay: auto_hide, type: type,placement: {from: "bottom",align: "right"},animate: {enter: 'animated fadeInUp',exit: 'animated fadeOutDown'}});
|
$.notify({message: msg},{z_index: 20000, delay: auto_hide, type: type,placement: {from: "bottom",align: "right"},animate: {enter: 'animated fadeInUp',exit: 'animated fadeOutDown'}});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".generate_password").click(async function( event ) {
|
$(".generate_password").click(async function( event ) {
|
||||||
try {
|
try {
|
||||||
var password_policy = await window.fetch("/api/v1/get/passwordpolicy", { method:'GET', cache:'no-cache' });
|
var password_policy = await window.fetch("/api/v1/get/passwordpolicy", { method:'GET', cache:'no-cache' });
|
||||||
var password_policy = await password_policy.json();
|
var password_policy = await password_policy.json();
|
||||||
random_passwd_length = password_policy.length;
|
random_passwd_length = password_policy.length;
|
||||||
@@ -48,7 +48,11 @@ $(document).ready(function() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
$(".rot-enc").html(function(){
|
$(".rot-enc").html(function(){
|
||||||
return str_rot13($(this).html())
|
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
|
// https://stackoverflow.com/questions/4399005/implementing-jquerys-shake-effect-with-animate
|
||||||
function shake(div,interval,distance,times) {
|
function shake(div,interval,distance,times) {
|
||||||
@@ -125,7 +129,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// responsive tabs, scroll to opened tab
|
// responsive tabs, scroll to opened tab
|
||||||
$(document).on("shown.bs.collapse shown.bs.tab", function (e) {
|
$(document).on("shown.bs.collapse shown.bs.tab", function (e) {
|
||||||
var target = $(e.target);
|
var target = $(e.target);
|
||||||
@@ -409,4 +413,4 @@ function copyToClipboard(id) {
|
|||||||
// only works with https connections
|
// only works with https connections
|
||||||
navigator.clipboard.writeText(copyText.value);
|
navigator.clipboard.writeText(copyText.value);
|
||||||
mailcow_alert_box(lang.copy_to_clipboard, "success");
|
mailcow_alert_box(lang.copy_to_clipboard, "success");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user