1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-14 12:40:13 +01:00

[ticket/15748] Trim whitespace before storing in data attribute

PHPBB3-15748
This commit is contained in:
Derky 2018-09-14 11:34:14 +02:00
parent 367f884d01
commit 4d5258b5a3

View File

@ -935,8 +935,8 @@ phpbb.addAjaxCallback('alt_text', function() {
$anchor.each(function() { $anchor.each(function() {
var $this = $(this); var $this = $(this);
altText = $this.attr('data-alt-text'); altText = $this.attr('data-alt-text');
$this.attr('data-alt-text', $this.text()); $this.attr('data-alt-text', $.trim($this.text()));
$this.attr('title', $.trim(altText)); $this.attr('title', altText);
$this.children('span').text(altText); $this.children('span').text(altText);
}); });
}); });