I have a simple 'for' loop in the ZML Editor like the below
- for each rec in Test_Form[ID!=0]
- {
- temp = rec.Media;
- %>
- <pr height='fill' width='fill'>
- <pc width='100%' padding='10px'>
- <pr height='auto' width='auto'>
- <pc>
- <button text='<%=temp%>' size='3' color='#000000' bgColor='#F0ECE6' type='flat' action='OpenReport' parameters='' target='new-window' componentLinkName='' cornerRadius='60px' /> </pc>
- </pr>
- </pc>
- </pr>
- <%
- }
- %>
This loop generates buttons with text=
'<%=temp%>'
The problem is that when the temp gets values like '
Click & Go' it returns error (
Failed to load ZML. Please check for errors in your ZML script and reload.
).
I think that the problem is the '&'.
When I manually test it like text='
Click
&
amp
;
Go' it works but when it gets the temp (from the loop) like text='
Click & Go'
it does not work. How can I solve this issue?
For sure I will have this problem and with other special characters like brackets etc.