Opened 10 years ago

Closed 9 years ago

#10412 closed enhancement (fixed)

Allow mailto: in linkdialog

Reported by: Jaanus Heeringson Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.5
Component: Editor Version: 1.4.0b
Keywords: linkDialog mailto regexp Cc: bill, Douglas Hays
Blocked By: Blocking:

Description

Currently mailto: links are considered invalid. I suggest adding it to the regexp or at least make it an optional addition.

I'm no star when it comes to regexp but so far I have concluded that it needs modification in three places:

  1. Add the mailto protocol
  2. Allow ':' without subsequent slashes
  3. Allow '@' in the tld string

I can se how this breaks validation in a bad way, so perhaps only add it as an option and disable by default?

Attachments (1)

LinkDialog_mailtosupport.patch (4.4 KB) - added by Jared Jurkiewicz 9 years ago.
Patch to enable dual-regexp checking to allow http/https/file, or mailto: formats. also enables auto-insert of mailto: if it detects input of foo@

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by bill

Milestone: tbd1.5

Marking for 1.5 for now, it seems like we should just allow it all the time. I can't see any downside to that.

comment:2 Changed 10 years ago by Jaanus Heeringson

No downside as long as we don't mix the http/ftp parsing with the mailto since they are in no way compatible - this'll make for an interesting regexp...

comment:3 Changed 9 years ago by Jared Jurkiewicz

Owner: set to Jared Jurkiewicz

Check out the patch. It basically needs two regexps. One that checks if the input matches url, another if it matches a mailto format. Simplest way was to keep them separate and over-ride the isValid() function of the textbox to compare both and return true if either was true.

See any downsides to this approach? Testing indicates it works fine.

comment:4 Changed 9 years ago by Jared Jurkiewicz

Cc: bill Douglas Hays added

Changed 9 years ago by Jared Jurkiewicz

Patch to enable dual-regexp checking to allow http/https/file, or mailto: formats. also enables auto-insert of mailto: if it detects input of foo@

comment:5 Changed 9 years ago by Jared Jurkiewicz

(In [21881]) Adding 'mailto' support into the LinkDialog?. Testcase needed. Will update the LinkDialog? tests shortly. refs #10412

comment:6 Changed 9 years ago by Jared Jurkiewicz

Fixed in [21882]

comment:7 Changed 9 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.