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

Apostrophe in option textbox coming out as '

Matt C.

Active member
#1
Hello, I'm having a bit of trouble getting this to work. :)

So I have an option here called "Hide Specific Channels?":
Screenshot (2).png

The option value is put here in the hideChannels variable.
Code:
<script type="text/javascript">
    discordWidget.init({
        serverId: '{$xenOptions.ahDiscordWidgetServerID}',
        title: '{$xenOptions.ahDiscordWidgetTitle}',
        join: <xen:if is="{$xenOptions.ahDiscordWidgetJoin}">true<xen:else />false</xen:if>,
        alphabetical: <xen:if is="{$xenOptions.ahDiscordWidgetAlph}">true<xen:else />false</xen:if>,
        theme: 'dark',
        hideChannels: <xen:if is="{$xenOptions.ahDiscordWidgetHideAll}">true<xen:else />[{$xenOptions.ahDiscordWidgetHide}]</xen:if>,
        showAllUsers: true,
        allUsersDefaultState: true
    });
    discordWidget.render();
</script>
The problem is that the apostrophes are being outputted as "&#039;" and not as a '. You can see here in the element inspector.
Screenshot.png

If someone could assist me, I'd appreciate it. :)
 

Matt C.

Active member
#2
I figured it out! If anyone else has the same problem, all you have to do is insert xen:raw at the beginning of your option variable. :)

Code:
{xen:raw $xenOptions.optionid}