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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
5e091546
Commit
5e091546
authored
Mar 26, 1999
by
terry%netscape.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redo the linkifying of URLs and email addresses to not munge up weird
cases so badly.
parent
1885150e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
13 deletions
+62
-13
CHANGES
CHANGES
+4
-3
README
README
+1
-8
bug_form.pl
bug_form.pl
+57
-2
No files found.
CHANGES
View file @
5e091546
...
@@ -10,10 +10,11 @@ query the CVS tree. For example,
...
@@ -10,10 +10,11 @@ query the CVS tree. For example,
will tell you what has been changed in the last week.
will tell you what has been changed in the last week.
3/24/99 Added quoting of URLs and email addresses in bug descriptions. This
3/25/99 Unfortunately, the HTML::FromText CPAN module had too many bugs, and
requires the use of the HTML::FromText CPAN module, which can be downloaded
so I had to roll my own. We no longer use the HTML::FromText CPAN module.
from ftp://ftp.cpan.org/pub/perl/CPAN/modules/by-module/HTML/.
3/24/99 (This entry has been removed. It used to say that we required the
HTML::FromText CPAN module, but that's no longer true.)
3/22/99 Added the ability to query by fields which have changed within a date
3/22/99 Added the ability to query by fields which have changed within a date
range. To make this perform a bit better, we need a new index:
range. To make this perform a bit better, we need a new index:
...
...
README
View file @
5e091546
...
@@ -161,12 +161,7 @@ It can be installed in the usual fashion after it has been fetched from
...
@@ -161,12 +161,7 @@ It can be installed in the usual fashion after it has been fetched from
CPAN where it is found as the Chart-x.x... tarball in a directory to be
CPAN where it is found as the Chart-x.x... tarball in a directory to be
listed in Appendix A.
listed in Appendix A.
1.9. HTML::FromText Perl module (1.001 or greater)
1.9. HTTP server
This module does conversion from plaintext to html, doing the right
things with URLs and stuff. You can find it on CPAN (link in Appendix A).
1.10. HTTP server
You have a freedom of choice here - Apache, Netscape or any other server on
You have a freedom of choice here - Apache, Netscape or any other server on
UNIX would do. The only thing - to make configuration easier you'd better run
UNIX would do. The only thing - to make configuration easier you'd better run
...
@@ -375,8 +370,6 @@ GD Perl module: ftp://ftp.cpan.org/pub/perl/CPAN/modules/by-module/GD/
...
@@ -375,8 +370,6 @@ GD Perl module: ftp://ftp.cpan.org/pub/perl/CPAN/modules/by-module/GD/
Chart::Base module:
Chart::Base module:
ftp://ftp.cpan.org/pub/perl/CPAN/modules/by-module/Chart/
ftp://ftp.cpan.org/pub/perl/CPAN/modules/by-module/Chart/
HTML::FromText module:
ftp://ftp.cpan.org/pub/perl/CPAN/modules/by-module/HTML/
Appendix B. Modifying Your Running System
Appendix B. Modifying Your Running System
...
...
bug_form.pl
View file @
5e091546
...
@@ -21,7 +21,62 @@
...
@@ -21,7 +21,62 @@
use
diagnostics
;
use
diagnostics
;
use
strict
;
use
strict
;
use
HTML::
FromText
;
# This routine quoteUrls contains inspirations from the HTML::FromText CPAN
# module by Gareth Rees <garethr@cre.canon.co.uk>. It has been heavily hacked,
# all that is really recognizable from the original is bits of the regular
# expressions.
sub
quoteUrls
{
my
$text
=
shift
;
# Take a copy; don't modify in-place.
return
$text
unless
$text
;
my
$protocol
=
join
'|'
,
qw(afs cid ftp gopher http https mid news nntp prospero telnet wais)
;
my
%
options
=
(
metachars
=>
1
,
@_
);
my
$count
=
0
;
# Now, quote any "#" characters so they won't confuse stuff later
$text
=~
s/#/%#/g
;
# Next, find anything that looks like a URL or an email address and
# pull them out the the text, replacing them with a "##<digits>##
# marker, and writing them into an array. All this confusion is
# necessary so that we don't match on something we've already replaced,
# which can happen if you do multiple s///g operations.
my
@things
;
while
(
$text
=~
s%((mailto:)?([\w\.\-\+\=]+\@\w+(?:\.\w+)+)\b|
(\b((?:$protocol):\S+[\w/])))%"##".$count."##"%exo
)
{
my
$item
=
$&
;
$item
=
value_quote
(
$item
);
if
(
$item
!~
m/^$protocol:/o
&&
$item
!~
/^mailto:/
)
{
# We must have grabbed this one because it looks like an email
# address.
$item
=
qq{<A HREF="mailto:$item">$item</A>}
;
}
else
{
$item
=
qq{<A HREF="$item">$item</A>}
;
}
$things
[
$count
++
]
=
$item
;
}
$text
=
value_quote
(
$text
);
# Stuff everything back from the array.
for
(
my
$i
=
0
;
$i
<
$count
;
$i
++
)
{
$text
=~
s/##$i##/$things[$i]/e
;
}
# And undo the quoting of "#" characters.
$text
=~
s/%#/#/g
;
return
$text
;
}
quietly_check_login
();
quietly_check_login
();
...
@@ -309,7 +364,7 @@ print "
...
@@ -309,7 +364,7 @@ print "
<HR>
<HR>
<PRE>
<PRE>
"
;
"
;
print
text2html
(
$bug
{
'long_desc'
},
email
=>
1
,
urls
=>
1
);
print
quoteUrls
(
$bug
{
'long_desc'
},
email
=>
1
,
urls
=>
1
);
print
"
print
"
</PRE>
</PRE>
<HR>\n"
;
<HR>\n"
;
...
...
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