I am using the query module to display a custom profile field in my forum templates:
{exp:query sql='SELECT occupation as orgname FROM exp_members WHERE screen_name="{author}";'}
{if "{orgname}"!=""} {orgname}{/if}
{/exp:query}
If the screen name contains an apostophe, then this breaks, and the page fails to display.
Is this a bug, or am I missing something here?