dynamic names for Record views

Hi All,

We have a Entity based record, in which multiple views were manually created. Requirement is to set some dynamic icons or text as the name of the Views. I have tried the below code to show an icon but the output is not as expected. Appreciate any suggestions on this. Thanks in advance.

View name coming with attributes as:

  Discussion posts and replies are publicly visible