BUG: Text After First Double Quote Not displayed in Form View

Last reviewed: December 11, 1997
Article ID: Q166894
The information in this article applies to:
  • Microsoft Visual InterDev, version 1.0

SYMPTOMS

When viewing the content of a database with a form created by the DataForm Wizard, if the database has a record with text of the form something "quoted text," nothing starting with the first double quote is displayed.

CAUSE

The function named QuotedString in the file xxxForm.asp generated by the wizard has this function:

   Function QuotedString(varTemp)
      If IsNull(varTemp) Then
         QuotedString = Chr(34) & Chr(34)
      Else
         QuotedString = Chr(34) & CStr(varTemp) & Chr(34)
      End If
   End Function

However CStr(varTemp) needs to be HTML encoded, so if the string includes a double quote, it is changed to an equivalent value including the escape character of the double quote (Chr(34)).

RESOLUTION

The function that needs to be changed in the XXXForm.asp is called QuotedString. The correct function should look like this:

   Function QuotedString(varTemp)
      If IsNull(varTemp) Then
        QuotedString = Chr(34) & Chr(34)
      Else
        QuotedString = Chr(34) & Server.HTMLEncode(CStr(varTemp)) & Chr(34)
      End If
   End Function

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a form with the DataForm wizard.

  2. Create a record with a TextField content of the form: something "quoted text."

  3. Try to view the record with xxxForm.asp.

REFERENCES

For the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/vinterdev/

Keywords          : VIWizards kbtool kbbuglist
Version           : 1.0
Platform          : WINDOWS
Issue type        : kbbug


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.