WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 13 days ago

#40204 closed defect (bug) (maybelater)

Pasting a URL over a shortcode attribute shouldn't produce a link

Reported by: johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Editor Keywords: needs-patch
Focuses: javascript, administration Cc:

Description

Steps to reproduce:

  1. Ensure you're on the Visual tab in the post editor.
  2. Add the following shortcode to the post content: [foo bar="http://example.com"].
  3. Copy a different URL into your clipboard and paste it over the contents of the bar attribute.

Expected behaviour is that the URL gets replaced with the URL from your clipboard.

Actual behaviour is that the value of the bar attribute gets converted into a link anchor, due to the automatic linking functionality in the editor.

Related: #38628.

Change History (2)

#1 @lukecavanagh
2 years ago

@johnbillion

I get this when you view in the text editor, so copied the Google URL and pasted in visual tab of the editor, over the http://example.com original URL.

[foo bar="<a href="https://www.google.com/">http://example.com</a>"]

#2 @pento
13 days ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

In line with #38628, I'm going to close this as maybelater, since the block editor supersedes both the classic editor, and shortcodes.

Note: See TracTickets for help on using tickets.