pet1234
New member
- Affected version
- v2.2.13
I am currently working with a system that involves an object called $staff_member. The staff member object has various attributes, one of which is 'username'. The system utilizes the <xf:avatar> function to generate avatars for the staff member.
The system builds an html structure out of strings that represents html code, as later I intend to use innerHTML to display it on the webpage.
This is the line I try to store as a string:
<xf:avatar user="{$staff_member}" size="s" />
When the value of the 'username' attribute includes a Backtick (`), it causes the function <xf:avatar> to return information about the wrong user only while being between backticks.
'<xf:avatar user="{$staff_member}" size="s" />'
So, in order to fix that, I tried storing the function between single quotes, but the code stops here due to an error with the return value of the function, as a multiline value tried to be stored between single or double quotes.
Who can guide me for a solution.
The system builds an html structure out of strings that represents html code, as later I intend to use innerHTML to display it on the webpage.
This is the line I try to store as a string:
<xf:avatar user="{$staff_member}" size="s" />
<xf:avatar user="{$staff_member}" size="s" />
When the value of the 'username' attribute includes a Backtick (`), it causes the function <xf:avatar> to return information about the wrong user only while being between backticks.
'<xf:avatar user="{$staff_member}" size="s" />'
So, in order to fix that, I tried storing the function between single quotes, but the code stops here due to an error with the return value of the function, as a multiline value tried to be stored between single or double quotes.
Who can guide me for a solution.