How do I pass special symbols like slash or pipe in JS code inline

Bronze Contributor
Bronze Contributor

Hello everyone,

I am using a Set Data Value extension and trying to pass a string which includes pipes, e.g, "AA | BB | CC" to an UDO through the inline JS code box. 

I have tried passing the whole string through text box but it didn't work. Searched on the site and found this - https://community.tealiumiq.com/t5/Tealium-iQ-Tag-Management/Using-quot-quot-in-JS-code-inline/m-p/5... so I have tried JS code with the follwing attempts -

"AA" + "\|" + "BB" + "\|" + "CC" --> failed

"AA | BB | CC" --> failed

"AA \| BB \| CC" --> failed

 

Does anyone know how I can make it work? Much appreaciated!

 

Best,

Qisi

1 REPLY 1

How do I pass special symbols like slash or pipe in JS code inline

Tealium Employee

@QisShao Do you have UTF-8 enabled or Minification turned on in the publish settings?

Can you screenshot the exact extension. If you need to you can change the values you are using.

Thanks, 
Adrian

Ask me anything Tealium related or Javascript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.
Public