From 6d835375c1ccb19efabb1768acfb0d361ef931b4 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Tue, 23 Jan 2018 11:22:40 -0500 Subject: Bug 1428270 - Unwrappable content in summary can cause top buttons to bleed out of main content box --- Bugzilla/Template.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Bugzilla/Template.pm') diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index f93b025bf..87496a89e 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -683,6 +683,18 @@ sub create { return $var; }, + # Insert `` HTML tags to camel and snake case words in the + # given string so a long bug summary, for example, will be wrapped + # in a preferred manner rather than overflowing or expanding the + # parent element. Examples: + # * `test_switch_window_content.py` + # * `TestSwitchToWindowContent` + wbr => sub { + my ($var) = @_; + $var =~ s/([a-z])([A-Z\._])/$1$2/g; + return $var; + }, + xml => \&Bugzilla::Util::xml_quote , # This filter is similar to url_quote but used a \ instead of a % -- cgit v1.2.3-24-g4f1b