Blog Sections Open

Keeping Square Brackets Intact When Outputting TV Content

If a TV stores JavaScript-like arrays or other bracket-heavy text, the parser can interfere unless the value is handled carefully.

Template variables are often used for simple text, image paths, or settings. Problems begin when a TV stores JavaScript fragments or array-like structures that contain square brackets. When those values are output directly, the parser may interpret part of the content as Evo tags and strip or distort it.

Why it happens

Evolution CMS uses square-bracket syntax for its own tags. If your TV contains nested brackets that resemble parser syntax, rendering it as plain template output can produce incomplete results.

Safer approaches

  • store structured data as JSON and decode it in a snippet before output
  • escape or transform the content before sending it into the template
  • move JavaScript configuration into a chunk or snippet that explicitly controls output

Practical recommendation

Do not treat a textarea TV as a raw code transport unless you fully control how it is rendered. For configuration arrays, JSON is usually the safest option because it is easier to validate and easier to process in both PHP and JavaScript.

Newer post

Making Infinite Scroll Work with Fancybox Galleries

How to keep Fancybox working after new images are appended to a page with infinite scroll.

Older post

Switching Between Two WebLoginPE Registration Forms with Radio Buttons

How to offer two different WebLoginPE registration flows on one page and switch between them with radio buttons.