Permit html use in lang templates

Closes: #1706
This commit is contained in:
Xavier Guimard 2019-05-17 08:05:36 +02:00
parent b91d1d4b87
commit 7abbb3fa66
3 changed files with 6 additions and 6 deletions

View File

@ -26,9 +26,9 @@ translatePage = (lang) ->
txt = translate args.shift()
for v in args
txt = txt.replace /%[sd]/, v
$(this).text txt
$(this).html txt
$("[trmsg]").each ->
$(this).text translate "PE#{$(this).attr 'trmsg'}"
$(this).html translate "PE#{$(this).attr 'trmsg'}"
msg = translate "PE#{$(this).attr 'trmsg'}"
if msg.match /_hide_/
$(this).parent().hide()

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.12.7
// Generated by CoffeeScript 1.12.8
/*
LemonLDAP::NG Portal jQuery scripts
@ -34,11 +34,11 @@ LemonLDAP::NG Portal jQuery scripts
v = args[i];
txt = txt.replace(/%[sd]/, v);
}
return $(this).text(txt);
return $(this).html(txt);
});
$("[trmsg]").each(function() {
var msg;
$(this).text(translate("PE" + ($(this).attr('trmsg'))));
$(this).html(translate("PE" + ($(this).attr('trmsg'))));
msg = translate("PE" + ($(this).attr('trmsg')));
if (msg.match(/_hide_/)) {
return $(this).parent().hide();

File diff suppressed because one or more lines are too long