• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 xen:set and special characters


Active member
Hello! I'm trying to do a template modification that effectively loops through specific users in order of their user title and then their username. Each time the loop encounters a new user title, it uses that as a header.

However, special characters don't seem to be coming through properly.

For example, an apostrophe comes through as 's

Here is my template code. It includes "Last Canon" and "This Canon" for testing methods.
<xen:foreach loop="$users" value="$user">
        <xen:if is="{$LastCanon}!={$user.custom_title}">
            <h2 class="subHeading">{$user.custom_title}</h2>
        Last Canon: {$LastCanon}<br>
        This Canon: {$user.custom_title}<br>
        <a href="{xen:link members, $user}" class="username">{$user.username}</a><br>
        <xen:set var="$LastCanon">{$user.custom_title}</xen:set>
And this is what currently outputs:
Assassin's Creed
Last Canon:
This Canon: Assassin's Creed
Assassin's Creed
Last Canon: Assassin&#039;s Creed
This Canon: Assassin's Creed
Mary Reed
BBC Merlin
Last Canon: Assassin&#039;s Creed
This Canon: BBC Merlin
Last Canon: BBC Merlin
This Canon: BBC Merlin
It looks like the special characters don't encode properly when going through xen:set. Is there a better way to approach this or a workaround?