Fog Creek Software
Discussion Board




Scout Message Truncated

When editing a case from Scout, I set the "Scout Msg" property to : "Please log out of the intranet by clicking the "Logout" link in the top right menu of the home page. Upon logging back in, you should not receive this error anymore. "

Anytime I edit that case, the message is truncated to: "Please log out of the intranet by clicking the". This is obviously a problem. Please let me know how I could resolve this.

Ryan Wood
Friday, August 06, 2004

Strange... I counted the characters and it came out to around being truncated to 47 which is just weird...

In dlgbugediting.asp you could change the size and maxlength for the sMessage field:

<input type="text"                     size="75"             maxlength="255"             name="sMessage"         style="width:300px"        class="bugEditing"
    value="<%=scout.sMessage%>" />

Michael H. Pryor
Fog Creek Software
Friday, August 06, 2004

It's not truncated on the DB side or from the textbox.

Once I click edit, the edit form is shown and the text boxes  are populated with the existing information. It only populates the truncated text in the "scout msg" field, not the whole thing, even the the whole message is still in the database. If I hit cancel, the message remains intact. It seems to be a problem with the page that populates the textboxes on edit.

Strange.

I haven't have a chance to dig into the code yet, but will hopefully have some time this week.

Ryan Wood
Monday, August 09, 2004

Check the HTML source of the page and see if the whole thing is there or not... I bet there is a weird character in there or something which is making it look truncated.

Michael H. Pryor
Fog Creek Software
Monday, August 09, 2004

Wild guess:  your quote is not being escaped as a &quot; (ampersand, q, u, o, t, semicolon).  Ok, maybe it's not so wild.  :)

Oli
Monday, August 09, 2004

Yup, that seems extremely likely... *slapping forehead for not realizing it earlier*.

Michael H. Pryor
Fog Creek Software
Monday, August 09, 2004

In BugzScoutRow in dlgBugEditing.asp you can see it sets the value of the input tag to scout.sMessage.

Just change that to "UnicodeClean(scout.sMessage)"

UnicodeClean will escape out the baddies.

Michael H. Pryor
Fog Creek Software
Monday, August 09, 2004

Thanks. Should have thought of that myself. Problem resolved.

Ryan Wood
Tuesday, August 10, 2004

*  Recent Topics

*  Fog Creek Home