Bugzilla – Attachment 91525 Details for
Bug 23050
Add hook to add a tab in intranet biblio details page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23050: Fix tab's id to avoid compatibility issues
Bug-23050-Fix-tabs-id-to-avoid-compatibility-issue.patch (text/plain), 1.22 KB, created by
Julian Maurice
on 2019-07-15 12:52:11 UTC
(
hide
)
Description:
Bug 23050: Fix tab's id to avoid compatibility issues
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2019-07-15 12:52:11 UTC
Size:
1.22 KB
patch
obsolete
>From 957348e7b52b0c1d6d7c408d3f8ba83587e2dbef Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 15 Jul 2019 14:28:47 +0200 >Subject: [PATCH] Bug 23050: Fix tab's id to avoid compatibility issues > >MDN says: > > Using characters except ASCII letters, digits, '_', '-' and '.' may > cause compatibility problems, as they weren't allowed in HTML 4. > Though this restriction has been lifted in HTML5, an ID should start > with a letter for compatibility. > >https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id >--- > catalogue/detail.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 4767ed4896..f2c42afefb 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -77,8 +77,8 @@ if ( C4::Context->preference('UseKohaPlugins') && > foreach my $tab_plugin (@tab_plugins) { > my @biblio_tabs = $tab_plugin->intranet_catalog_biblio_tab(); > foreach my $tab (@biblio_tabs) { >- $tab->{id} = $tab->{title}; >- $tab->{id} =~ s/[^\w]+/-/g; >+ $tab->{id} = 'tab-' + $tab->{title}; >+ $tab->{id} =~ s/[^0-9A-Za-z]+/-/g; > push @tabs, $tab, > } > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23050
:
90337
|
90348
|
91523
|
91524
|
91525
|
93222
|
95004
|
95005
|
95006
|
95007
|
95013
|
95406