Opened 5 years ago
Last modified 10 months ago
#52601 new defect (bug)
Link validation issue on TinyMCE using Classic Editor
| Reported by: | audrasjb | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Editor | Version: | 5.6 |
| Severity: | minor | Keywords: | 2nd-opinion |
| Cc: | Focuses: | javascript |
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
@
10 months ago
- Focuses javascript added
- Keywords 2nd-opinion added
- Severity normal → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.