kylelutz / chemkit

A C++ library for molecular modelling, cheminformatics and molecular visualization.
http://www.chemkit.org
BSD 3-Clause "New" or "Revised" License
54 stars 27 forks source link

sdf reader / cjson writer doesn't sanitize "name" field #29

Closed itdaniher closed 12 years ago

itdaniher commented 12 years ago

Found a molfile document from EBI that contains the name of the molecule in quotes. This causes the cjson writer to output a node like:

"name": ""2-thiouridine"",

Needless to say, this breaks everything ever.

Test script, cjson writer output, and traceback are up at https://gist.github.com/2968739.

kylelutz commented 12 years ago

Patch pushed to gerrit: http://review.source.kitware.com/#/t/842/

kylelutz commented 12 years ago

Fixed: 6867ad6dcbd3fd3a452811a80f88e351aaf51ec8