aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerky <derky@phpbb.com>2018-09-14 11:34:14 +0200
committerDerky <derky@phpbb.com>2018-09-14 11:34:14 +0200
commit4d5258b5a3e9595af83ca9192e845fbc22dd7457 (patch)
treec4680c48f547a5b70327144f8c933314fc706cad /phpBB/assets
parent[ticket/15748] Fix toggle alt text (diff)
downloadphpbb-4d5258b5a3e9595af83ca9192e845fbc22dd7457.tar.gz
phpbb-4d5258b5a3e9595af83ca9192e845fbc22dd7457.tar.bz2
phpbb-4d5258b5a3e9595af83ca9192e845fbc22dd7457.zip
[ticket/15748] Trim whitespace before storing in data attribute
PHPBB3-15748
Diffstat (limited to 'phpBB/assets')
-rw-r--r--phpBB/assets/javascript/core.js4
1 files 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);
});
});