bowdidge / switchlist

Mac Switchlist generator for Model Railroads
http://www.vasonabranch.com/switchlist
1 stars 2 forks source link

Car type abbreviations with line feeds breaks cargo report #86

Open bowdidge opened 6 years ago

bowdidge commented 6 years ago

If a car type has an abbreviated name with a line feed, the cargo report fails to draw because of unexpected newlines in strings. See the Nicholas and Ashley Creek.swl example on switchlist mailing list for an example. The switchlist file looks like:

<object type="CARTYPE" id="z118">
    <attribute name="cartypename" type="string">T

Retyping the abbreviations fixes the problem.

The different generators that put strings into HTML should check for invalid characters like this.