playMaker

Author Topic: [ArrayMaker] "Split Text To Array List" not sanitized  (Read 747 times)

drown

  • Junior Playmaker
  • **
  • Posts: 58
[ArrayMaker] "Split Text To Array List" not sanitized
« on: December 09, 2022, 09:06:52 AM »
I ran into an issue where multiple string comparisons failed for some odd reason. I then found that the split array is not sanitized thus the strings contain the newline character - which resulted in identical strings being tested against each other returning as false.

Action is SplitTextToArrayList.cs and possible others. Crudely fixed it by changing line 145 of the script from

Code: [Select]
lines[j] = rawlines[i]
into

Code: [Select]
lines[j] = rawlines[i].Replace("\n", "").Replace("\r", "");
but I am sure there are better ways. Maybe this also applies to other Split Text actions ?