From f8727c5475bdccfc3dda74506833c0b07fec39cf Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 25 Feb 2011 18:03:27 +0100 Subject: [PATCH] Bearbeiten von Nutzern mit Umlauten im Namen gefixt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit HTML.url() nimmt Perls interne Stringrepräsentation und ersetzt darin die Umlaute. In UTF-8-Installationen muss das Ersetzen aber auf einer UTF-8-Repräsentation erfolgen (so wie es Form::escape() auch macht). Zweiter Teil des Fixes für Bug 1606. --- bin/mozilla/admin.pl | 6 +++++- templates/webpages/admin/list_users.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index e92de0c24..ddb12b1d8 100755 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -34,6 +34,7 @@ use DBI; use CGI; +use Encode; use English qw(-no_match_vars); use Fcntl; use File::Copy; @@ -342,7 +343,10 @@ sub list_users { delete $members{"root login"}; - map { $_->{templates} =~ s|.*/||; } values %members; + for (values %members) { + $_->{templates} =~ s|.*/||; + $_->{login_url} = $::locale->is_utf8 ? Encode::encode('utf-8-strict', $_->{login}) : $_->{login_url}; + } $form->{title} = "Lx-Office ERP " . $locale->text('Administration'); $form->{LOCKED} = -e _nologin_file_name(); diff --git a/templates/webpages/admin/list_users.html b/templates/webpages/admin/list_users.html index 0828b00c3..eb55dc51c 100644 --- a/templates/webpages/admin/list_users.html +++ b/templates/webpages/admin/list_users.html @@ -21,7 +21,7 @@ [% FOREACH row = MEMBERS %] -  [% HTML.escape(row.login) %] +  [% HTML.escape(row.login) %]  [% HTML.escape(row.name) %]  [% HTML.escape(row.company) %]  [% HTML.escape(row.templates) %] -- 2.20.1