Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2594

JS Compiler: Single quotes are not being escaped in constants.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.1
    • 0.9.2
    • JavaScript - Compiler
    • None
    • Windows 7

    Description

      If you define a constant containing single quotes in the thrift IDL the resulting JS constants are not properly escaped.

      Example:

      test.thrift
      const string test = "blah ' blub '' blahblahblubberblub''''''''"
      

      gets compiled into

      test_types.js
      test = 'blah ' blub '' blahblahblubberblub''''''''';
      

      instead it should result in

      test_types.js - new
      test = 'blah \' blub \'\' blahblahblubberblub\'\'\'\'\'\'\'\'';
      

      Attachments

        Activity

          People

            roger Roger Meier
            ibn Thomas Lazar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: