Decode html chars in dashboard greeting translation#26245
Decode html chars in dashboard greeting translation#26245
Conversation
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
What about putting this into @nextcloud/l10n then? |
| } | ||
| }, | ||
| htmlDecode(s) { | ||
| return s.replace(/&#(\d+);/g, (match, code) => { |
There was a problem hiding this comment.
Don't we have a lib for it?
I would prefer not to have random pieces of code here and there?
https://www.npmjs.com/package/html-entities
Line 55 in 6b4cfc5
html-entities seems a bit big, but we have to see what real size is being added to the webpack bundle?
|
@skjnldsv Do you mean adding and exporting a decode function in @nextcloud/l10n and letting developers use it when they want |
No I mean fixing the t and n function to automatically htmldecode? |
refs #26113
Not an ideal solution but it works.
This could be done in many other places.