Lines 19-25
package C4::Creators::Lib;
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
use Storable qw( dclone ); |
21 |
use Storable qw( dclone ); |
22 |
|
22 |
use HTML::Entities; |
23 |
use autouse 'Data::Dumper' => qw(Dumper); |
23 |
use autouse 'Data::Dumper' => qw(Dumper); |
24 |
|
24 |
|
25 |
use C4::Context; |
25 |
use C4::Context; |
Lines 345-352
sub get_label_summary {
Link Here
|
345 |
$record->{'title'} =~ s/\W*$//; # strip off ugly trailing chars |
345 |
$record->{'title'} =~ s/\W*$//; # strip off ugly trailing chars |
346 |
# FIXME contructing staff interface URLs should be done *much* higher up the stack - for the most part, C4 module code |
346 |
# FIXME contructing staff interface URLs should be done *much* higher up the stack - for the most part, C4 module code |
347 |
# should not know that it's part of a web app |
347 |
# should not know that it's part of a web app |
348 |
$record->{'title'} = '<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' . $record->{'biblionumber'} . '"> ' . $record->{'title'} . '</a>'; |
348 |
$record->{'title'} = '<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' . HTML::Entities::encode($record->{'biblionumber'}) . '"> ' . HTML::Entities::encode($record->{'title'}) . '</a>'; |
349 |
$label_summary->{'_summary'} = $record->{'title'} . " | " . ($record->{'author'} ? $record->{'author'} : 'N/A'); |
349 |
$label_summary->{'_summary'} = $record->{'title'} . " | " . ($record->{'author'} ? HTML::Entities::encode($record->{'author'}) : 'N/A'); |
350 |
$label_summary->{'_item_type'} = C4::Context->preference("item-level_itypes") ? $record->{'itype'} : $record->{'itemtype'}; |
350 |
$label_summary->{'_item_type'} = C4::Context->preference("item-level_itypes") ? $record->{'itype'} : $record->{'itemtype'}; |
351 |
$label_summary->{'_barcode'} = $record->{'barcode'}; |
351 |
$label_summary->{'_barcode'} = $record->{'barcode'}; |
352 |
$label_summary->{'_item_number'} = $item->{'item_number'}; |
352 |
$label_summary->{'_item_number'} = $item->{'item_number'}; |