This project has moved. For the latest updates, please go here.

Formatting of Lobby.aspx Page

Topics: User Forum
Jun 4, 2007 at 10:37 PM
Hey all,

We are using rich text for our assignment descriptions and those descriptions are showing up as plain text on the Lobby.aspx page, which looks unsightly as it shows <div> and other formatting tags as text!

I see the following code in the Lobby.aspx page:

lblDescription.Text = SlkUtilities.GetCrlfHtmlEncodedText(LearnerAssignmentProperties.Description);

I tried changing it to this and still see the code:

lblDescription.Text = SlkUtilities.GetHtmlEncodedText(LearnerAssignmentProperties.Description);

Anyone know what I need to do to fix this?

Jun 5, 2007 at 3:08 PM
Hey Nick,

lblDescription.Text = SlkUtilities.GetCrlfHtmlEncodedText(LearnerAssignmentProperties.Description);

This is written with an explicit intention to disallow all kinds of HTML interpretation in the 'Description'. I can't think of why that is so, though. Still pondering on that point.

If you want to just ignore that fact and have HTML interpretation of the description, you could remove that call and simply do,

lblDescription.Text = LearnerAssignmentProperties.Description;

However note that GetCrlfHtmlEncodedText(...) does two things - HTML encoding (which removes the html interpretation) and Crlf encoding (replaces new line characters in the description to HTML so that the new lines display properly).. In your case, you want to remove the first one, but may want to keep the second one. Therefore, you may have to look at the definition of this function and change it to perform the second task and not do the first task.

Jun 5, 2007 at 11:50 PM
Interesting, thanks for the info!

With regards to the following:

Crlf encoding (replaces new line characters in the description to HTML so that the new lines display properly)

What do you mean displays properly? What happens if there are new lines in the HTML and we don't do anything to filter them? Does something like "\n" display or something?