Unterminated string. Expected delimiter


I have a custom property, which contains a simple multiline textbox. This is a legacy property which has some backend processing on Save Data. This property  was working fine in EpiServer 6 and also worked fine after upgraded to 7. Now I am facing a problem. Whenever the user enters single quote (') within this property, it saves properly, but when the user re loads the property by clicking the "..." button in edit mode, it throws the following error. I tried to escape the ' in the Get/Set method of the Value of the property, but I could not get rid of this problem. Anybody has a solution for this? Thanks


Unterminated string. Expected delimiter: ". Path '', line 1, position 63.              Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.            
Exception Details: Newtonsoft.Json.JsonReaderException: Unterminated string. Expected delimiter: ". Path '', line 1, position 63.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.                  

Stack Trace:

[JsonReaderException: Unterminated string. Expected delimiter: ". Path '', line 1, position 63.]
   Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote) +1209
   Newtonsoft.Json.JsonTextReader.ParseString(Char quote) +41
   Newtonsoft.Json.JsonTextReader.ParseValue() +459
   Newtonsoft.Json.JsonTextReader.ReadInternal() +64
   Newtonsoft.Json.JsonReader.ReadAsStringInternal() +30
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) +149
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) +867
   Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) +537
   EPiServer.UI.Edit.EditProperty.ApplyPostedValue() +355
   EPiServer.UI.Edit.EditProperty.Page_Init(Object sender, EventArgs e) +204
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Page.OnInit(EventArgs e) +105
   EPiServer.UI.ContentBaseWebForm.OnInit(EventArgs e) +16
   System.Web.UI.Control.InitRecursive(Control namingContainer) +133
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1970
Apr 22, 2013 14:21
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.