itinero / GTFS

.NET implementation of a General Transit Feed Specification (GTFS) feed parser.
http://www.itinero.tech
MIT License
69 stars 44 forks source link

Strings containing quotes are not properly quoted by the GTFSWriter #77

Closed thzinc closed 2 years ago

thzinc commented 2 years ago

Any string value that is written using the GTFSWriter.WriteFieldString(string, string, string) signature where the value contains a " but no , is not properly escaped in the result.

Example call:

this.WriteFieldString("trips", "trip_headsign", "\"this is a string containing a quoted value\"");

Expected:

"""this is a string containing a quoted value"""

Actual:

""this is a string containing a quoted value""
thzinc commented 2 years ago

Also found that reading GTFS files with strings containing escaped quotes failed too