Closed Bug 277209 Opened 20 years ago Closed 6 years ago

[XMLLogger] URLs should be flagged.

Categories

(Webtools Graveyard :: Mozbot, enhancement, P4)

enhancement

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: scott, Unassigned)

References

Details

(Whiteboard: [has-attachment])

Attachments

(1 file)

The XMLLogger module should have configurable regular expressions that it uses
to flag messages with customizable xml tags.

More specifically, I set the variable flagPatterns to
'[a-z]+://[a-z0-9-]+(\.[a-z0-9-]+)+(/[^ "]*)?'=>"link" and every URL found gets
wrapped with <link> tags.

A possible patch will be attached shortly.
This patch also puts a reference to a stylesheet into the XML output.  Sorry to
include both in a single patch.  I'll submit a second bug and attch the
stylesheets to it.
Blocks: 277212
I just discovered a bug in my patch...  around line 130 the if($message =~
m/(.*?)($pattern)(.*)/) and the line after it should just be:
$message =~ s|($pattern)|<$tag>$1</$tag>|g;

Much simpler, and works correctly.  Unfortunately, I don't have a corresponding
source file to generate a new patch.
QA Contact: kerz → mozbot
Resetting to new default owner.
Assignee: ian → nobody
Whiteboard: [has-attachment]
Priority: -- → P4

Mozbot/Firebot is in maintenance-only mode; no further changes are planned.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: