From 4d5258b5a3e9595af83ca9192e845fbc22dd7457 Mon Sep 17 00:00:00 2001 From: Derky Date: Fri, 14 Sep 2018 11:34:14 +0200 Subject: [PATCH] [ticket/15748] Trim whitespace before storing in data attribute PHPBB3-15748 --- phpBB/assets/javascript/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 0c528dba5e..32be1cf6ed 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -935,8 +935,8 @@ phpbb.addAjaxCallback('alt_text', function() { $anchor.each(function() { var $this = $(this); altText = $this.attr('data-alt-text'); - $this.attr('data-alt-text', $this.text()); - $this.attr('title', $.trim(altText)); + $this.attr('data-alt-text', $.trim($this.text())); + $this.attr('title', altText); $this.children('span').text(altText); }); });