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

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.1
    • Fix Version/s: 0.9.2
    • Component/s: JavaScript - Compiler
    • Labels:
      None
    • Environment:

      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

            • Assignee:
              roger Roger Meier
              Reporter:
              ibn Thomas Lazar

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment