Commit c26e64e4 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 880282: Replace |FILTER no_break| by |class="nowrap"| to prevent dashes…

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
parent 91e07807
...@@ -833,14 +833,6 @@ sub create { ...@@ -833,14 +833,6 @@ sub create {
return $var; 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 , xml => \&Bugzilla::Util::xml_quote ,
# This filter is similar to url_quote but used a \ instead of a % # This filter is similar to url_quote but used a \ instead of a %
......
...@@ -71,7 +71,6 @@ foreach my $include_path (@include_paths) { ...@@ -71,7 +71,6 @@ foreach my $include_path (@include_paths) {
FILTERS => FILTERS =>
{ {
html_linebreak => sub { return $_; }, html_linebreak => sub { return $_; },
no_break => sub { return $_; } ,
js => sub { return $_ } , js => sub { return $_ } ,
base64 => sub { return $_ } , base64 => sub { return $_ } ,
inactive => [ sub { return sub { return $_; } }, 1] , inactive => [ sub { return sub { return $_; } }, 1] ,
......
...@@ -109,7 +109,9 @@ ...@@ -109,7 +109,9 @@
[% FOREACH type = types %] [% FOREACH type = types %]
<tr class="[% IF type.is_active %]active[% ELSE %]inactive[% END %]"> <tr class="[% IF type.is_active %]active[% ELSE %]inactive[% END %]">
<td><a href="editflagtypes.cgi?action=edit&amp;id=[% type.id %]">[% type.name FILTER html FILTER no_break %]</a></td> <td class="nowrap">
<a href="editflagtypes.cgi?action=edit&amp;id=[% type.id %]">[% type.name FILTER html %]</a>
</td>
<td>[% type.description FILTER html %]</td> <td>[% type.description FILTER html %]</td>
<td class="right">[% type.sortkey FILTER html %]</td> <td class="right">[% type.sortkey FILTER html %]</td>
<td> <td>
......
...@@ -114,7 +114,7 @@ function toggle_display(link) { ...@@ -114,7 +114,7 @@ function toggle_display(link) {
[% ELSE %] [% ELSE %]
[% flag.setter.nick FILTER html %]: [% flag.setter.nick FILTER html %]:
[% END %] [% END %]
[%+ flag.type.name FILTER html FILTER no_break %][% flag.status %] [%+ flag.type.name FILTER html %][% flag.status %]
[%+ IF flag.status == "?" && flag.requestee %] [%+ IF flag.status == "?" && flag.requestee %]
[% IF user.id %] [% IF user.id %]
(<span title="[% flag.requestee.identity FILTER html %]">[% flag.requestee.nick FILTER html %]</span>) (<span title="[% flag.requestee.identity FILTER html %]">[% flag.requestee.nick FILTER html %]</span>)
......
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
[% ELSE %] [% ELSE %]
[% FOREACH flag = attachment.flags %] [% FOREACH flag = attachment.flags %]
[% flag.setter.nick FILTER html %]: [% flag.setter.nick FILTER html %]:
[%+ flag.type.name FILTER html FILTER no_break %][% flag.status %] <span class="nowrap">[%+ flag.type.name FILTER html %][% flag.status %]</span>
[% IF flag.status == "?" && flag.requestee %] [% IF flag.status == "?" && flag.requestee %]
([% flag.requestee.nick FILTER html %]) ([% flag.requestee.nick FILTER html %])
[% END %][% ", " IF not loop.last() %] [% END %][% ", " IF not loop.last() %]
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
[% FOREACH type = bug.flag_types %] [% FOREACH type = bug.flag_types %]
[% FOREACH flag = type.flags %] [% FOREACH flag = type.flags %]
[% flag.setter.nick FILTER html %]: [% flag.setter.nick FILTER html %]:
[%+ flag.type.name FILTER html FILTER no_break %][% flag.status %] <span class="nowrap">[%+ flag.type.name FILTER html %][% flag.status %]</span>
[%+ IF flag.status == "?" && flag.requestee %] [%+ IF flag.status == "?" && flag.requestee %]
([% flag.requestee.nick FILTER html %]) ([% flag.requestee.nick FILTER html %])
[% END %]<br> [% END %]<br>
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
[% ELSE %] [% ELSE %]
[% flag.setter.nick FILTER html %]: [% flag.setter.nick FILTER html %]:
[% END %] [% END %]
[%+ type.name FILTER html FILTER no_break %][% flag.status %] <span class="nowrap">[%+ type.name FILTER html %][% flag.status %]</span>
[% IF flag.requestee %] [% IF flag.requestee %]
[% IF flag.requestee.name %] [% IF flag.requestee.name %]
(<span title="[% flag.requestee.name FILTER html %]">[% flag.requestee.nick FILTER html %]</span>) (<span title="[% flag.requestee.name FILTER html %]">[% flag.requestee.nick FILTER html %]</span>)
...@@ -107,9 +107,9 @@ ...@@ -107,9 +107,9 @@
[% addl_text FILTER html %] [% addl_text FILTER html %]
[% END %] [% END %]
</td> </td>
<td> <td class="nowrap">
<label title="[% type.description FILTER html %]" for="[% fid FILTER html %]"> <label title="[% type.description FILTER html %]" for="[% fid FILTER html %]">
[%- type.name FILTER html FILTER no_break -%]</label> [%- type.name FILTER html %]</label>
</td> </td>
<td> <td>
<input type="hidden" id="[% fid FILTER html %]_dirty"> <input type="hidden" id="[% fid FILTER html %]_dirty">
......
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
[% FOREACH p = c.products %] [% FOREACH p = c.products %]
<tr> <tr>
<th class="right"> <th class="right nowrap">
<a href="[% target %]?product=[% p.name FILTER uri -%] <a href="[% target %]?product=[% p.name FILTER uri -%]
[%- IF previous_params %]&amp;[% previous_params FILTER none %][% END -%]"> [%- IF previous_params %]&amp;[% previous_params FILTER none %][% END -%]">
[% p.name FILTER html FILTER no_break %]</a>:&nbsp; [% p.name FILTER html %]</a>:
</th> </th>
<td>[% p.description FILTER html_light %]</td> <td>[% p.description FILTER html_light %]</td>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<a href="buglist.cgi?cmdtype=dorem&amp;remaction=run&amp;namedcmd= <a href="buglist.cgi?cmdtype=dorem&amp;remaction=run&amp;namedcmd=
[%- q.name FILTER uri %]&amp;sharer_id=[% q.user.id FILTER uri %]" [%- q.name FILTER uri %]&amp;sharer_id=[% q.user.id FILTER uri %]"
class="shared" title="Shared by [% q.user.identity FILTER html %]"> class="shared" title="Shared by [% q.user.identity FILTER html %]">
[%- q.name FILTER html FILTER no_break %]</a> [%- q.name FILTER html %]</a>
</li> </li>
[% END %] [% END %]
</ul> </ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment