Closed Bug 361914 Opened 18 years ago Closed 18 years ago

hostmasks should not be formatted as mailto urls

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: sdaugherty, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

(Whiteboard: [cz-0.9.78])

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

Host masks on IRC rarely if ever correspond to email addresses. The formatting preference to hyper link text that looks like an email address should only apply to  text that's likely to contain an email address, and not to server responses that will contain only host masks.

This functionality makes it harder to copy and paste host masks in the default client configuration.

Reproducible: Always
Marking as blocking for some bugs that need updated patches when this gets in.
Blocks: 237538, 252848
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch PatchSplinter Review
Disables mailto munging by default, enabling for echo, msg, notice, ctcp-action, topic (because the topic might contain mailto's).
Assignee: rginda → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #248649 - Flags: review?(silver)
Comment on attachment 248649 [details] [diff] [review]
Patch

>     munger.addRule ("mailto",
>        /(?:\s|\W|^)((mailto:)?[^<>\[\]()\'\"\s\u201d]+@[^.<>\[\]()\'\"\s\u201d]+\.[^<>\[\]()\'\"\s\u201d]+)/i,
>-                    insertMailToLink);
>+                    insertMailToLink, false);

This wont work as you intend; the code at the end of initMunger enables it from the pref straight away. You probably want to rename the rule to ".mailto".

r=silver with that.
Attachment #248649 - Flags: review?(silver) → review+
Patch for checkin. Note that I've also did the whole munger entry disable stuff in output-window.js, so the channel header always gets updated correctly
Checked in --> FIXED
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.78]
Latest nightly seems to work correctly.
(In reply to comment #6)
> Latest nightly seems to work correctly.

--> VERIFIED

Status: RESOLVED → VERIFIED
This change has regressed multiline sends, because this line:

client.currentObject.dispatch("say " + msg);

fails for multiline messages because the commands get split onto lines which don't have a command, which fails to work.

The proper way to do this is:

client.currentObject.dispatch("say", {message: msg});

which fixes the regression. That fix has been checked in with r+ from Silver on IRC.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: