Playout inconsistencies with textarea newlines
petterw03 opened this issue · 1 comments
petterw03 commented
If using the textarea field type and json dataformat, newlines are parsed differently depending on if play or update command is used.
Template definition:
window.SPXGCTemplateDefinition = {
"description": "Textarea test",
"playserver": "OVERLAY",
"playchannel": "1",
"playlayer": "10",
"webplayout": "10",
"steps" : "1",
"out": "manual",
"uicolor": "2",
"dataformat": "json",
"DataFields": [
{
"field": "f0",
"ftype": "textarea",
"title": "Content",
"value": "",
},
],
};
Value of f0 when using play: Test test test<br>Second line test
Value of f0 when using update: Test test test\nSecond line test
So on play(), the newline is converted to an escaped <br>
tag, which seems to be happening here: https://github.com/TuomoKu/SPX-GC/blob/master/routes/routes-application.js#L1359-L1372
But for some reason, the same is not done on update(). This makes it hard to code template logic that detects newlines.