Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playout inconsistencies with textarea newlines #69

Open
petterw03 opened this issue Oct 14, 2022 · 0 comments
Open

Playout inconsistencies with textarea newlines #69

petterw03 opened this issue Oct 14, 2022 · 0 comments

Comments

@petterw03
Copy link

petterw03 commented Oct 14, 2022

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": "",
        },
      ],
    };

Example input:
image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant