I am seeing a very strange behavior.
1. Desired behavior:
I want to split a string into an array with the carriage return '\n' as a separator.
The input is something like this:
First\n\n\nSecond\n\nThird
I expect the following output:
[
"First",
"",
"",
"Second",
"",
"Third"
]
I did some testing and it should works fine. On the screenshot below you find:
- a hardcoded test splitting the hardcoded 'First\nSecond\nThird' string on the fly
- A 2 steps test initializing a variable and splitting it afterwards


Both versions are working.
2. Proof of concept:
The string I will be receiving will be like this:
Kiwicon\n\n\nWellington\n\nNZ...
So I hardcoded this string in a variable and build the logic with it. It works fine.


3. The problem
Now I initialize this variable with the proper value instead of hardcoding it. This value comes from an RSS file. It is the 'title' value here below:

Instead of the "Kiwicon\n\n\nWellington\n\nNZ..." I expected, the carriage returns '\n' seem to be interpreted. The output is:
Kiwicon
Wellington
NZ...

This in turns seems to mess up the splitting:

As you can see, the split didn't happen. And I cannot explain why...