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
66493d5e
Commit
66493d5e
authored
Sep 21, 2002
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 108987 - Linkify script to use quoteUrls on texts provided by user. Patch by gerv; r=kiko.
parent
a29e0e06
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
6 deletions
+90
-6
bug_form.pl
bug_form.pl
+0
-1
globals.pl
globals.pl
+3
-0
long_list.cgi
long_list.cgi
+0
-1
page.cgi
page.cgi
+6
-3
process_bug.cgi
process_bug.cgi
+0
-1
linked.html.tmpl
template/en/default/pages/linked.html.tmpl
+43
-0
linkify.html.tmpl
template/en/default/pages/linkify.html.tmpl
+38
-0
No files found.
bug_form.pl
View file @
66493d5e
...
...
@@ -58,7 +58,6 @@ sub show_bug {
my
$vars
=
$::vars
;
$vars
->
{
'GetBugLink'
}
=
\&
GetBugLink
;
$vars
->
{
'quoteUrls'
}
=
\&
quoteUrls
,
$vars
->
{
'lsearch'
}
=
\&
lsearch
,
$vars
->
{
'header_done'
}
=
(
@_
),
...
...
globals.pl
View file @
66493d5e
...
...
@@ -1545,6 +1545,9 @@ $::vars =
# Generic linear search function
'lsearch'
=>
\&
Bugzilla::Util::
lsearch
,
# quoteUrls - autolinkifies text
'quoteUrls'
=>
\&
quoteUrls
,
# UserInGroup - you probably want to cache this
'UserInGroup'
=>
\&
UserInGroup
,
...
...
long_list.cgi
View file @
66493d5e
...
...
@@ -98,7 +98,6 @@ $vars->{'bugs'} = \@bugs;
$vars
->
{
'use_keywords'
}
=
1
if
(
@::legal_keywords
);
$vars
->
{
'quoteUrls'
}
=
\&
quoteUrls
;
$vars
->
{
'str2time'
}
=
\&
str2time
;
# Work out a sensible filename for Content-Disposition.
...
...
page.cgi
View file @
66493d5e
...
...
@@ -39,11 +39,14 @@ ConnectToDatabase();
quietly_check_login
();
if
(
defined
$::FORM
{
'id'
})
{
if
(
$::FORM
{
'id'
})
{
# Remove all dodgy chars, and split into name and ctype.
$::FORM
{
'id'
}
=~
s/[^\w\-\.]//g
;
$::FORM
{
'id'
}
=~
/(.*)
(\.(.*))?
/
;
$::FORM
{
'id'
}
=~
/(.*)
\.(.*)
/
;
my
$format
=
GetFormat
(
$1
,
undef
,
$3
);
my
$format
=
GetFormat
(
$1
,
undef
,
$2
);
$vars
->
{
'form'
}
=
\%::
FORM
;
print
"Content-Type: $format->{'ctype'}\n\n"
;
...
...
process_bug.cgi
View file @
66493d5e
...
...
@@ -1089,7 +1089,6 @@ foreach my $id (@idlist) {
$vars
->
{
'mform'
}
=
\%::
MFORM
;
$vars
->
{
'bug_id'
}
=
$id
;
$vars
->
{
'quoteUrls'
}
=
\&
quoteUrls
;
SendSQL
(
"UNLOCK TABLES"
);
...
...
template/en/default/pages/linked.html.tmpl
0 → 100644
View file @
66493d5e
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stefan Seifert <nine@detonation.org>
# Gervase Markham <gerv@gerv.net>
#%]
[% INCLUDE global/header.html.tmpl title = "Your Linkified Text" %]
<p>
Copy and paste the text below:
</p>
<p>
<tt>
[% quoteUrls(form.text) FILTER html %]
</tt>
</p>
<p>
It will end up looking like this:
</p>
<p>
[% quoteUrls(form.text) %]
</p>
[% INCLUDE global/footer.html.tmpl %]
template/en/default/pages/linkify.html.tmpl
0 → 100644
View file @
66493d5e
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stefan Seifert <nine@detonation.org>
# Gervase Markham <gerv@gerv.net>
#%]
[% INCLUDE global/header.html.tmpl title = "Linkify Text" %]
<p>
If you enter some text, this form will return it marked up like a
standard Bugzilla comment. That is, valid bug numbers, URLs, email addresses
and so on will be replaced with appropriate HTML links.
</p>
<form action="page.cgi" method="post">
<textarea cols="80" rows="20" name="text"></textarea>
<br>
<input type="hidden" name="id" value="linked.html">
<input value="Linkify" type="submit">
</form>
[% INCLUDE global/footer.html.tmpl %]
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