Not a bug xf:avatar backtick interpolation

Status
Not open for further replies.

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" />


<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.
 
This is not a bug... it should be posted in the XF development help area
If you don't have access to that area, associate your username with your XF license holder account here. Once you do that, you should shortly have access.
If you don't hold a current license, then if you are assisting a valid license holder, have them add you to the Forum Users section under their license account and you can then post for support.
 
You will need to associate your forum user name with your customer account to post in the support forums.
 
Status
Not open for further replies.
Top Bottom