SeisComP3 / seiscomp3

SeisComP is a seismological software for data acquisition, processing, distribution and interactive analysis.
Other
111 stars 88 forks source link

Problems with single quotes at the beggining of earthquake name #157

Closed jordi-domingo closed 6 years ago

jordi-domingo commented 6 years ago

Hi all,

I'm experiencing what seems a bug when using single quotes in the earthquake name (or any EventDescription), specifically when the single quote is at the beginning.

i.e: if I put the string 'test as earthquake name in scolv, it is saved in the database as 'test'test

+----------+-------------+---------------------+------------+-----------------+
| _oid     | _parent_oid | _last_modified      | text       | type            |
+----------+-------------+---------------------+------------+-----------------+
| 38625521 |    38460201 | 2017-12-07 15:39:47 | 'test'test | earthquake name |
+----------+-------------+---------------------+------------+-----------------+

Seems to be a problem with escaping these single quotes when storing to the database (SQL).

It even gets worse if you try it more times without restarting SC3, because it stores the string repeated >2 times (and also with other strings previously tried!).

gempa-jabe commented 6 years ago

I confirm this behaviour. It is not a matter of wrong escaping. An internal reset of a variable was just missing.

gempa-jabe commented 6 years ago

It is fixed with 4f465942c4b532900cd86c4db858b2b14eb9a360.

jordi-domingo commented 6 years ago

Great, it works! Thanks for the quick fix.