Widgets: Allow relative/partial URLs in Image Widget's link field.

Props audrasjb.
Amends [41252].
See #41274.
Fixes #42740.


git-svn-id: https://develop.svn.wordpress.org/trunk@42533 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2018-01-22 04:51:16 +00:00
parent 10b459f8e8
commit 8ae0bc51be
1 changed files with 1 additions and 1 deletions

View File

@ -329,7 +329,7 @@ class WP_Widget_Media_Image extends WP_Widget_Media {
<# if ( data.url ) { #>
<p class="media-widget-image-link">
<label for="{{ elementIdPrefix }}linkUrl"><?php esc_html_e( 'Link to:' ); ?></label>
<input id="{{ elementIdPrefix }}linkUrl" type="url" class="widefat link" value="{{ data.link_url }}" placeholder="http://">
<input id="{{ elementIdPrefix }}linkUrl" type="text" class="widefat link" value="{{ data.link_url }}" placeholder="http://" pattern="((\w+:)?\/\/\w.*|\w+:(?!\/\/$)|\/|\?|#).*">
</p>
<# } #>
</script>