has anyone used cdata in their velocity templates? My template always prints out the end ]]> when i preview a snippet templates that isn’t xml. Is there a way around this:
#set($text = $sys.item.getProperty(‘displaytitle’).String.replace("<p>", “”))##
#set($text2 = $text.replace("</p>", “”))##
#set($text3= $text2.replace("</a>", “”))##
#set($text4 = $text3.replace(">", ’ style=“font-weight:bold;color:rgb(247, 147, 30);text-decoration:underline;” target="_blank"><span style=“font-weight:bold;color:rgb(247, 147, 30);text-decoration:underline;”>’))##
#set($text5 = “</span></a>”)##
#define($data)$text4$text5#end
<![CDATA[$data]]>
Out put looks like this
<a><span></span></a>]]>