diff --git a/api/js/etemplate/et2_widget_link.js b/api/js/etemplate/et2_widget_link.js index 3807ff6d5f..16e5761d0b 100644 --- a/api/js/etemplate/et2_widget_link.js +++ b/api/js/etemplate/et2_widget_link.js @@ -1160,7 +1160,7 @@ var et2_link = /** @class */ (function (_super) { // Set up title to optionally break on the provided character - replace all space with nbsp, add a // zero-width space after the break string _value = _value - .replace(this.options.break_title, this.options.break_title + "\u200B") + .replace(this.options.break_title, this.options.break_title.trimEnd() + "\u200B") .replace(/ /g, '\u00a0'); } jQuery(node).text(_value + ""); diff --git a/api/js/etemplate/et2_widget_link.ts b/api/js/etemplate/et2_widget_link.ts index 4f103347e7..4b1ec23ae2 100644 --- a/api/js/etemplate/et2_widget_link.ts +++ b/api/js/etemplate/et2_widget_link.ts @@ -1465,7 +1465,7 @@ export class et2_link extends et2_valueWidget implements et2_IDetachedDOM // Set up title to optionally break on the provided character - replace all space with nbsp, add a // zero-width space after the break string _value = _value - .replace(this.options.break_title, this.options.break_title+"\u200B") + .replace(this.options.break_title, this.options.break_title.trimEnd()+"\u200B") .replace(/ /g, '\u00a0'); } jQuery(node).text(_value+"");