Thomas Lazar created THRIFT-2594:
------------------------------------
Summary: JS Compiler: Single quotes are not being escaped in
constants.
Key: THRIFT-2594
URL: https://issues.apache.org/jira/browse/THRIFT-2594
Project: Thrift
Issue Type: Bug
Components: JavaScript - Compiler
Affects Versions: 0.9.1
Environment: Windows 7
Reporter: Thomas Lazar
If you define a constant containing single quotes in the thrift IDL the
resulting JS constants are not properly escaped.
Example:
{code:title=test.thrift}
const string test = "blah ' blub '' blahblahblubberblub''''''''"
{code}
gets compiled into
{code:title=test_types.js}
test = 'blah ' blub '' blahblahblubberblub''''''''';
{code}
instead it should result in
{code:title=test_types.js - new}
test = 'blah \' blub \'\' blahblahblubberblub\'\'\'\'\'\'\'\'';
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)