Closed ashecret closed 8 years ago
My problem, too. It is because the replace function replaces only the first occurrence of a string.
The issue could easily be solved like this:
function fillVariables(text, options) { text = text.split("%username%").join(options.user.get("username")); text = text.split("%email%").join(options.user.get("email")); text = text.split("%appname%").join(options.appName); text = text.split("% link%").join(options.link); return text; }
Fixed in PR #9
Merci, c'était rapide :-)
If
%link%
variable is used in more than one places, let's say one in a link button and one as plain text in a paragraph, it's rendered in the first place only. I have tried switching places and using other html attributes.