Make WordPress Core

Opened 10 years ago

Closed 7 years ago

#40204 closed defect (bug) (maybelater)

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

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

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
10 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
7 years ago

  • Milestone Awaiting Review
  • Resolution → maybelater
  • Status new → 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.