#19992 closed enhancement (fixed)
Auto-fill URL field on Insert/edit link popup
Reported by: | tillkruess | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 3.3.1 |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
I'd like to see the following behavior: When I select a plain URL or email address in the editor and click on "Insert/edit link" the URL field is already populated with either the URL or with a "mailto:<email-address>". Any thoughts? I'd more than happy to write a patch.
Attachments (5)
Change History (28)
#4
@
13 years ago
The regular expressions used in the attached patch where taken from jquery.validate.js. Not sure if there are better ones out there or maybe even already in WP?
#8
@
13 years ago
- Version changed from 3.4 to 3.3.1
The version field is used to track when an issue was first reported.
#9
@
12 years ago
Why does the patch include ftp on line 290? I was going to submit a ticket for mailto: support since I just had a client complain about not being able to link to their email address and only to their site. I am glad there is a patch :).
#11
@
12 years ago
Cool. I am always for keeping WordPress as simple as possible and not confusing end-users. Do you agree that it would be easier for most users just to have http, https and mailto? How many people need to link to FTP? If you know about FTP, you probably can add it into the HTML.
#12
@
10 years ago
- Milestone changed from Awaiting Review to 4.0
19992.diff refreshes so it applies against modern-day trunk
#13
@
10 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 28705:
#14
@
10 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
These regexes should be put into variables, as suggested in IRC.
#15
@
10 years ago
Do we want this to work in the Text editor too? Also, why the "super bulky" regexp? We are not validating user input, just suggesting. Maybe can use something much smaller/faster?
This ticket was mentioned in IRC in #wordpress-dev by azaozz. View the logs.
10 years ago
#18
@
10 years ago
19992.3.diff uses much simpler expressions, based on http://www.regular-expressions.info/email.html.
#21
follow-up:
↓ 23
@
10 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
The last patch was limiting the URLs only to the domain. 19992.4.diff matches whole URLs including query/fragment and fixes double encoding of &
. It still excludes IDNs and the new(er) TLDs that are longer than 4 letters. Should we support these?
Related: #18149