[vhffs-dev] [1999] added idn punycode to unicode support in template processing |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1999
Author: gradator
Date: 2012-02-08 23:07:20 +0100 (Wed, 08 Feb 2012)
Log Message:
-----------
added idn punycode to unicode support in template processing
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Panel/Main.pm
trunk/vhffs-public/templates/content/group-details.tt
trunk/vhffs-test-dependencies.in
Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm 2012-02-07 22:18:33 UTC (rev 1998)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm 2012-02-08 22:07:20 UTC (rev 1999)
@@ -465,7 +465,11 @@
},
stringify_type => sub {
Vhffs::Functions::type_string_from_type_id( $_[0] );
- }
+ },
+ idn_to_unicode => sub {
+ require Net::LibIDN;
+ Encode::decode_utf8( Net::LibIDN::idn_to_unicode( $_[0] , 'utf-8') );
+ },
},
PRE_CHOMP => 2
};
Modified: trunk/vhffs-public/templates/content/group-details.tt
===================================================================
--- trunk/vhffs-public/templates/content/group-details.tt 2012-02-07 22:18:33 UTC (rev 1998)
+++ trunk/vhffs-public/templates/content/group-details.tt 2012-02-08 22:07:20 UTC (rev 1999)
@@ -39,7 +39,7 @@
<ul class="webareas-info">
[% FOREACH w = websites %]
<li>
-<p><a class="webarea-link" href="http://[% w.servername %]">[% w.servername %]</a></p>
+<p><a class="webarea-link" href="http://[% w.servername %]">[% w.servername | idn_to_unicode %]</a></p>
<p>[% w.description | html | html_para %]</p>
</li>
[% END %]
Modified: trunk/vhffs-test-dependencies.in
===================================================================
--- trunk/vhffs-test-dependencies.in 2012-02-07 22:18:33 UTC (rev 1998)
+++ trunk/vhffs-test-dependencies.in 2012-02-08 22:07:20 UTC (rev 1999)
@@ -10,7 +10,7 @@
$dep{'api'} = [
('Carp', ''),
('CGI', ''),
- ('CGI::Fast', ''),
+ ('CGI::Fast', ''),
('CGI::Session', ''),
('Config::General', ''),
('Crypt::GPG', ''),
@@ -61,7 +61,9 @@
('GD::Text::Wrap', ''),
('locale', ''),
('Locale::gettext', ''),
- ('Captcha::reCAPTCHA', '')];
+ ('Captcha::reCAPTCHA', ''),
+ ('Net::LibIDN', '')];
+
$dep{'robots'} = [
('BSD::Resource', ''),