From c26e64e4f13bb7e6d29ab2b1f27bbe26ff048e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Wed, 11 Mar 2015 19:04:36 +0100 Subject: Bug 880282: Replace |FILTER no_break| by |class="nowrap"| to prevent dashes (U+002D) from being replaced by non-breaking hyphens/dashes (U+2011) r=dkl a=justdave --- Bugzilla/Template.pm | 8 -------- t/004template.t | 1 - template/en/default/admin/flag-type/list.html.tmpl | 4 +++- template/en/default/attachment/list.html.tmpl | 2 +- template/en/default/bug/show-multiple.html.tmpl | 4 ++-- template/en/default/flag/list.html.tmpl | 6 +++--- template/en/default/global/choose-product.html.tmpl | 4 ++-- template/en/default/global/useful-links.html.tmpl | 2 +- 8 files changed, 12 insertions(+), 19 deletions(-) diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index f909f5f0d..836bbc7ac 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -833,14 +833,6 @@ sub create { return $var; }, - # Prevents line break on hyphens and whitespaces. - no_break => sub { - my ($var) = @_; - $var =~ s/ /\ /g; - $var =~ s/-/\‑/g; - return $var; - }, - xml => \&Bugzilla::Util::xml_quote , # This filter is similar to url_quote but used a \ instead of a % diff --git a/t/004template.t b/t/004template.t index d38f9e16b..0a6f0e0aa 100644 --- a/t/004template.t +++ b/t/004template.t @@ -71,7 +71,6 @@ foreach my $include_path (@include_paths) { FILTERS => { html_linebreak => sub { return $_; }, - no_break => sub { return $_; } , js => sub { return $_ } , base64 => sub { return $_ } , inactive => [ sub { return sub { return $_; } }, 1] , diff --git a/template/en/default/admin/flag-type/list.html.tmpl b/template/en/default/admin/flag-type/list.html.tmpl index f4836ca7d..b91b49199 100644 --- a/template/en/default/admin/flag-type/list.html.tmpl +++ b/template/en/default/admin/flag-type/list.html.tmpl @@ -109,7 +109,9 @@ [% FOREACH type = types %] - [% type.name FILTER html FILTER no_break %] + + [% type.name FILTER html %] + [% type.description FILTER html %] [% type.sortkey FILTER html %] diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index 4599f38ed..9676dd67b 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -114,7 +114,7 @@ function toggle_display(link) { [% ELSE %] [% flag.setter.nick FILTER html %]: [% END %] - [%+ flag.type.name FILTER html FILTER no_break %][% flag.status %] + [%+ flag.type.name FILTER html %][% flag.status %] [%+ IF flag.status == "?" && flag.requestee %] [% IF user.id %] ([% flag.requestee.nick FILTER html %]) diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl index 99dd53215..8babdf04a 100644 --- a/template/en/default/bug/show-multiple.html.tmpl +++ b/template/en/default/bug/show-multiple.html.tmpl @@ -263,7 +263,7 @@ [% ELSE %] [% FOREACH flag = attachment.flags %] [% flag.setter.nick FILTER html %]: - [%+ flag.type.name FILTER html FILTER no_break %][% flag.status %] + [%+ flag.type.name FILTER html %][% flag.status %] [% IF flag.status == "?" && flag.requestee %] ([% flag.requestee.nick FILTER html %]) [% END %][% ", " IF not loop.last() %] @@ -352,7 +352,7 @@ [% FOREACH type = bug.flag_types %] [% FOREACH flag = type.flags %] [% flag.setter.nick FILTER html %]: - [%+ flag.type.name FILTER html FILTER no_break %][% flag.status %] + [%+ flag.type.name FILTER html %][% flag.status %] [%+ IF flag.status == "?" && flag.requestee %] ([% flag.requestee.nick FILTER html %]) [% END %]
diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl index 7547e5687..047fd4425 100644 --- a/template/en/default/flag/list.html.tmpl +++ b/template/en/default/flag/list.html.tmpl @@ -80,7 +80,7 @@ [% ELSE %] [% flag.setter.nick FILTER html %]: [% END %] - [%+ type.name FILTER html FILTER no_break %][% flag.status %] + [%+ type.name FILTER html %][% flag.status %] [% IF flag.requestee %] [% IF flag.requestee.name %] ([% flag.requestee.nick FILTER html %]) @@ -107,9 +107,9 @@ [% addl_text FILTER html %] [% END %] - + + [%- type.name FILTER html %] diff --git a/template/en/default/global/choose-product.html.tmpl b/template/en/default/global/choose-product.html.tmpl index 7349d1ced..a1582532a 100644 --- a/template/en/default/global/choose-product.html.tmpl +++ b/template/en/default/global/choose-product.html.tmpl @@ -45,10 +45,10 @@ [% FOREACH p = c.products %] - + - [% p.name FILTER html FILTER no_break %]:  + [% p.name FILTER html %]: [% p.description FILTER html_light %] diff --git a/template/en/default/global/useful-links.html.tmpl b/template/en/default/global/useful-links.html.tmpl index 97c7f709c..5c5bfc316 100644 --- a/template/en/default/global/useful-links.html.tmpl +++ b/template/en/default/global/useful-links.html.tmpl @@ -46,7 +46,7 @@ - [%- q.name FILTER html FILTER no_break %] + [%- q.name FILTER html %] [% END %] -- cgit v1.2.1