You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a problem in the left vertical list of the posts titles with the preview of the post body: The post body is not decoded correctly if it's written in a non-latin alphabet (For the Greek language in my case), as it is shown on my screenshot here.
The solution I have found and tested is quite simple though.
In the file frontend-app-discussions/src/discussions/posts/post/PostLink.jsx
at the beginning you have to import 'he':
There is a problem in the left vertical list of the posts titles with the preview of the post body: The post body is not decoded correctly if it's written in a non-latin alphabet (For the Greek language in my case), as it is shown on my screenshot here.
The solution I have found and tested is quite simple though.
In the file
frontend-app-discussions/src/discussions/posts/post/PostLink.jsx
at the beginning you have to import
'he'
:import he from 'he';
and at the following line:
frontend-app-discussions/src/discussions/posts/post/PostLink.jsx
Line 99 in 2dafb6a
you have to decode the
previewBody
like so:{isPostPreviewAvailable(previewBody) ? he.decode(previewBody) : intl.formatMessage(messages.postWithoutPreview)}
And that fixes the problem.
That's my solution but I guess there are other ways to deal with it as well...
The text was updated successfully, but these errors were encountered: