diff --git a/src/wp-admin/js/dashboard.js b/src/wp-admin/js/dashboard.js index f88be70fd9..4d4eb50d0c 100644 --- a/src/wp-admin/js/dashboard.js +++ b/src/wp-admin/js/dashboard.js @@ -159,9 +159,9 @@ jQuery(document).ready( function($) { editor.on('focus input propertychange', function() { var $this = $(this), //   is to ensure that the height of a final trailing newline is included. - textareaContent = $this.val().replace(/\n/g, '
') + ' ', + textareaContent = $this.val() + ' ', // 2px is for border-top & border-bottom - cloneHeight = clone.css('width', $this.css('width')).html(textareaContent).outerHeight() + 2; + cloneHeight = clone.css('width', $this.css('width')).text(textareaContent).outerHeight() + 2; // Default to having scrollbars editor.css('overflow-y', 'auto');