From ea5ba644009f8b94fee27e76dcee81a62fb2da1d Mon Sep 17 00:00:00 2001 From: Ella Iseulde Van Dorpe Date: Sun, 7 Jun 2015 21:10:17 +0000 Subject: [PATCH] Editor: link modal: use link as fallback for text If there is no link text provided, use the link as the text. This is better than silently failing. Props bcole808. Fixes #32323. git-svn-id: https://develop.svn.wordpress.org/trunk@32705 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/wplink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/wplink.js b/src/wp-includes/js/wplink.js index b685365584..1dfeae70ab 100644 --- a/src/wp-includes/js/wplink.js +++ b/src/wp-includes/js/wplink.js @@ -354,7 +354,7 @@ var wpLink; } link = getLink(); - text = inputs.text.val(); + text = inputs.text.val() || attrs.href; if ( link ) { if ( text ) {