davidmueller13 / open-delta

Automatically exported from code.google.com/p/open-delta
0 stars 0 forks source link

Newlines and semicolons in Intkey dataset titles cause problems with preferences #224

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Repro:

Set registry key 
HKEY_CURRENT_USER\Software\JavaSoft\Prefs\au\org\ala\delta\intkey

to:

/H:///Delta_data///P/O/L/Y///Spionidae_/Jun2011//intkey.ink;//qc//sa500//keepn//
b//fs30{} /Australian /Spionidae character notes,/u000d/u000aincluding image 
references/R./Wilson, /M/V, 
21-/Jul-2012//fs22//b0{}/u000a/C://rwilson///Delta_data///Polynoidae_/May2012//i
ntkey.ink;/C://rwilson///Delta_data///Polynoidae_/May2012//intkey.ink/u000a/H://
/Delta_data///P/O/L/Y///Maldanidae//intkey.ink;/H:///Delta_data///P/O/L/Y///Mald
anidae//intkey.ink/u000a/H:///Delta_data///P/O/L/Y///Nereididae2012///Intkey.ink
;/H:///Delta_data///P/O/L/Y///Nereididae2012///Intkey.ink

Then start intkey. 

Semicolons or newlines in dataset titles are saved out to the preferences for 
the MRU list and then cause problems when the preferences string is parsed next 
time the program is run.

These characters need to be stripped out before data is saved to preferences. 
Also a try-catch needs to be put around the preferences parsing code to clear 
the preferences and start up with no MRU list if parsing fails.

RTF should also be stripped out for readability. It should also be stripped out 
anywhere where the dataset name is displayed in intkey, e.g. the app title bar.

Original issue reported on code.google.com by chris.fl...@gmail.com on 20 Dec 2012 at 5:11

GoogleCodeExporter commented 9 years ago
Fixed. RTF formatting, newlines and semicolons are now stripped out of the 
heading before storing in the MRU list.

Original comment by chris.fl...@gmail.com on 21 Dec 2012 at 1:00