Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
0922b446
Commit
0922b446
authored
Aug 25, 2014
by
Koosha KM
Committed by
David Lawrence
Aug 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1054642: quoteUrls() enters an infinite loop with a list of nonexistent bug ids to be linkified
r=glob,a=sgreen
parent
dfcf3064
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
Template.pm
Bugzilla/Template.pm
+8
-13
No files found.
Bugzilla/Template.pm
View file @
0922b446
...
...
@@ -263,28 +263,23 @@ sub quoteUrls {
my
$bugs_re
=
qr/\Q$bugs_word\E$s*\#?$s*
\d+(?:$s*,$s*\#?$s*\d+)+/
ix
;
while
(
$text
=~
m/($bugs_re)/g
)
{
my
$offset
=
$-
[
0
];
my
$length
=
$+
[
0
]
-
$-
[
0
];
my
$match
=
$1
;
$text
=~
s{($bugs_re)}{
my $match = $1;
$match =~ s/((?:#$s*)?(\d+))/$bug_link_func->($2, $1);/eg;
# Replace the old string with the linkified one.
substr
(
$text
,
$offset
,
$length
)
=
$match
;
}
$match;
}eg
;
my
$comments_word
=
template_var
(
'terms'
)
->
{
comments
};
my
$comments_re
=
qr/(?:comments|\Q$comments_word\E)$s*\#?$s*
\d+(?:$s*,$s*\#?$s*\d+)+/
ix
;
while
(
$text
=~
m/($comments_re)/g
)
{
my
$offset
=
$-
[
0
];
my
$length
=
$+
[
0
]
-
$-
[
0
];
my
$match
=
$1
;
$text
=~
s{($comments_re)}{
my $match = $1;
$match =~ s|((?:#$s*)?(\d+))|<a href="$current_bugurl#c$2">$1</a>|g;
substr
(
$text
,
$offset
,
$length
)
=
$match
;
}
$match;
}
eg
;
# Old duplicate markers. These don't use $bug_word because they are old
# and were never customizable.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment