From c05f758e77c8c3025f6190098fcf87ddf832a60a Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 8 Jan 2019 11:55:43 +0000 Subject: [PATCH] added trim() removes whitespace before and after the string so line breaks in the HTML will now work. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim --- jquery.translate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jquery.translate.js b/jquery.translate.js index 980c8fa..9e9ad57 100644 --- a/jquery.translate.js +++ b/jquery.translate.js @@ -70,6 +70,7 @@ var trn_key = $this.attr("data-trn-key"); if (!trn_key) { trn_key = $this.html(); + trn_key = trn_key.trim(); $this.attr("data-trn-key", trn_key); //store key for next time } @@ -82,4 +83,4 @@ }; -})(jQuery); \ No newline at end of file +})(jQuery);