RustyLogic
unread,Jun 18, 2008, 6:55:45 AM6/18/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RedDot CMS Users
Handy tip:
As mentioned before in this forum, the following won't work if there
are special characters in the text:
string articleText = "<%txt_bodyText%>";
But, we can use:
string articleText ="<%!! Escape:HtmlEncode(<%txt_bodyText%>) !!%>";
Unfortunately the HTMLEncode function is broken (sorry, I mean it has
the following 'expected behaviour'):
If the txt_bodyText is empty then HtmlEncode returns "()". Don't ask
me why!
So to get around that we do the following:
string articleText="";
<!IoRangeConditional>articleText ="<%!! Escape:HtmlEncode(<
%txt_bodyText%>) !!%>";<!/IoRangeConditional>
articleText now contains txt_bodyText!
Ta,
John