Gossamer
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.
And this is what currently outputs:
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?
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.
HTML:
<xen:foreach loop="$users" value="$user">
<xen:if is="{$LastCanon}!={$user.custom_title}">
<h2 class="subHeading">{$user.custom_title}</h2>
</xen:if>
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>
</xen:foreach>
And this is what currently outputs:
Assassin's Creed
Last Canon:
This Canon: Assassin's Creed
Fiora
Assassin's Creed
Last Canon: Assassin's Creed
This Canon: Assassin's Creed
Mary Reed
BBC Merlin
Last Canon: Assassin's Creed
This Canon: BBC Merlin
Arthur
Last Canon: BBC Merlin
This Canon: BBC Merlin
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?