aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets/javascript
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/javascript
parent367f884d01b54a2d9cbe8d5d47b1947bb52bf8df (diff)
downloadforums-4d5258b5a3e9595af83ca9192e845fbc22dd7457.tar
forums-4d5258b5a3e9595af83ca9192e845fbc22dd7457.tar.gz
forums-4d5258b5a3e9595af83ca9192e845fbc22dd7457.tar.bz2
forums-4d5258b5a3e9595af83ca9192e845fbc22dd7457.tar.xz
forums-4d5258b5a3e9595af83ca9192e845fbc22dd7457.zip
[ticket/15748] Trim whitespace before storing in data attribute
PHPBB3-15748
Diffstat (limited to 'phpBB/assets/javascript')
-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);
});
});