Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1302

Properly escape string in tosjon()

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.5.4
    • None
    • JavaScript
    • None
    • ALL

    Description

      > tojson("asdf\x00adsf")
      "asdfadsf"

      should be "asdf\u0000asdf"

      > tojson("asdf\nadsf")
      "asdf
      adsf"

      should be "asdf\nasdf"

      > tojson("asdf
      adsf")
      "asdf\adsf"

      should be "asdf
      asdf"

      Attachments

        Activity

          People

            mathias@mongodb.com Mathias Stearn
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: