Opened 5 years ago
Last modified 7 weeks ago
#52601 new defect (bug)
Link validation issue on TinyMCE using Classic Editor
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | minor | Version: | 5.6 |
| Component: | Editor | Keywords: | 2nd-opinion |
| Focuses: | javascript | Cc: |
Description
Just spotted a small issue on Classic Editor, during the 5.6.2 release party.
New links seem to have a data-wplink-url-error="true" attribute after they are inserted. It’s ok after the post is saved.
Attachments (1)
Change History (3)
#2
@
7 weeks ago
- Focuses javascript added
- Keywords 2nd-opinion added
- Severity changed from normal to minor
@azaozz mentioned that localhost links 'should never appear on a "live" web page', but maybe it could be worth ignoring them in the checkLink() function.
if ( /^http/i.test( href ) && ( ! urlRegex1.test( href ) || ! urlRegex2.test( href ) ) && ( ! href.includes( '://localhost' ) ) ) {
Note: See
TracTickets for help on using
tickets.
I think the error showed because the URL includes localhost (see ticket:36638#comment:47). I get the same error on my local installations.
The link validates positively when I try selecting a page on a site with public URLs, though.