X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FWidgets%2FTitleBoxStart;h=d1fc6f59d6c09be8cdb7965d9063ec5539556617;hp=492cfab0b0932600e7ef0358ba2563c700aff951;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c diff --git a/rt/share/html/Widgets/TitleBoxStart b/rt/share/html/Widgets/TitleBoxStart index 492cfab0b..d1fc6f59d 100755 --- a/rt/share/html/Widgets/TitleBoxStart +++ b/rt/share/html/Widgets/TitleBoxStart @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -45,24 +45,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -
" id="<% $id %>"> +
<% $rolledup ? " rolled-up" : ""%>" id="<% $id %>"> -
- +
" id="<% $tid %>"> <%ARGS> $class => '' $bodyclass => '' @@ -75,20 +71,23 @@ $titleright => '' $titleright_raw => '' $id => '' $hideable => 1 +$rolledup => 0 <%init> +$hideable = 1 if $rolledup; # # This should be pretty bulletproof # my $page = $m->request_comp->path; -my $title_b64 = MIME::Base64::encode_base64(Encode::encode_utf8($title), ''); +my $title_b64 = MIME::Base64::encode_base64(Encode::encode( "UTF-8", $title), ''); my $tid = "TitleBox--$page--" . join '--', ($class, $bodyclass, $title_b64, $id); -$tid =~ s{[^A-Za-z0-9\-_:\.]+}{_}g; +# Replace anything that ISN'T alphanumeric, a hyphen, or an underscore +$tid =~ s{[^A-Za-z0-9\-_]}{_}g; my $i = 0; $i++ while $m->notes("$tid-$i");