You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Thomas Lazar (JIRA)" <ji...@apache.org> on 2014/06/30 10:44:24 UTC
[jira] [Created] (THRIFT-2594) JS Compiler: Single quotes are not
being escaped in constants.
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)