Problem in passing data to HTML template

When i’m passing data in an HTML5 template I have the following problem.
I create a key (e.g. f0), I type some text in value and it works fine.
If i press Enter in the value field it doesn’t work and it loads the default text from the template.

This is happening because Enter (new line) or <br> is not being handled in casparcg.js script. When this is encountered in casparcg it breaks the command and error occurs. So default data appears.


Is there any way to solve it?

You can do like this

1 Like

Thank you very much.
Can i also send a line break to the template?
Becuase in that way it displays all text in one line (e.g. vimlesh kumar Tanti).

You need to modify the casparcg.js like below. Note that you need to remove “escapeHtml” function

    function dataInsert(dataCaspar) {
    for (var idCaspar in dataCaspar) {
    var idTemplate = document.getElementById(idCaspar);
    if (idTemplate != undefined) {
   //idTemplate.innerHTML = escapeHtml(dataCaspar[idCaspar]);
    idTemplate.innerHTML = (dataCaspar[idCaspar]);

And then type the values like below.