Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#60829 new enhancement

Improve shortcode support for link fields

Reported by: Code Muffin Owned by:
Priority: normal Milestone: Awaiting Review
Component: Editor Version:
Severity: normal Keywords:
Cc: Focuses:

Description

Using a shortcode in a link field currently prepends http:// to the field. They still render on the frontend, but this makes them functionally unusable because the resulting href is always prepended by that http://.

This is due to the JS function correctURL (in wp-includes/js/wplink.js), which adds it if the URL does not start with http:, https:, ? # or /.

I suggest adding [ to that list of allowed characters, so shortcodes can be used too.

Change History (1)

#1 @Code Muffin
2 years ago

  • Summary Add shortcode support to link fieldsImprove shortcode support for link fields
Note: See TracTickets for help on using tickets.