diff --git a/web/cgi-bin/horas/popup.pl b/web/cgi-bin/horas/popup.pl index d6ed9477c5..b53c812801 100755 --- a/web/cgi-bin/horas/popup.pl +++ b/web/cgi-bin/horas/popup.pl @@ -91,12 +91,21 @@ package main; $textwidth = 90; $only = $lang1 && $lang1 =~ /^$lang2$/i; precedence(); +setsecondcol(); load_languages_data($lang1, $lang2, $version, $missa); -$title = translate(get_link_name($popup), $lang1); + +# We need to revert the masked parantheses at this point +$popup =~ s/\&lpar/\(/; +$popup =~ s/\&rpar/\)/; +my $title = $popup; +$title =~ s/^[\$\&]?([a-z])/\u$1/; +$title =~ s/,/ /; +$title =~ s/,/-/; +$title = translate(get_link_name($title), $lang1); $title =~ s/[\$\&]//; $expand = 'all'; -if ($popup =~ /\&/) { $popup =~ s /\s/\_/g; } +if ($popup =~ /\&/) { $popup =~ s/\s/\_/g; } $text = resolve_refs($popup, $lang1); $t = length($text); diff --git a/web/cgi-bin/horas/webdia.pl b/web/cgi-bin/horas/webdia.pl index 12e3391492..1d52a1154c 100644 --- a/web/cgi-bin/horas/webdia.pl +++ b/web/cgi-bin/horas/webdia.pl @@ -614,6 +614,10 @@ sub wnum { # set a link line sub linkcode { my ($name, $ind, $lang, $disabled) = @_; + + # We need to mask paranthesis to be passed via JavaScript to popup.pl + $name =~ s/\(/\&lpar/; + $name =~ s/\)/\&rpar/; return ""; }