FOX427
2015-03-03 20:31:22 UTC
Hi All! I am fetching data from xml as usual, I have a node
${document.details.location} and it might have html markup in it, so for
example in one xml the node is empty and in another it has a lot of markup
like:
<location>
<p> Some Hotel Name <www.google.com>  <br /> Some Street<br /> Miami,
FL 33131<br /> 305 503 5555 </p>.
</location>
The problem is, if I use <#escape x as x?html> and put
${document.details.location} in it the it will give me:
<p> Some Hotel Name <www.google.com>  <br /> Some Street<br /> Miami,
FL 33131<br /> 305 503 5555 </p>.(including <br> <p> and etc. in the browser
)
If I generate xml and wrap that node in CDATA like here:
<location>
</location>
then I have:
Some Hotel Name
Some Street
Miami, FL 33131
305 503 5555
]]>
So the issue here I am getting "*]]>* " out of nowhere....Can someone
explain what is best practice in handling random html markup nodes so i can
be safe. Thanks in advance.
--
View this message in context: http://freemarker.624813.n4.nabble.com/html-markup-escape-and-CDATA-issue-tp4655387.html
Sent from the freemarker-user mailing list archive at Nabble.com.
${document.details.location} and it might have html markup in it, so for
example in one xml the node is empty and in another it has a lot of markup
like:
<location>
<p> Some Hotel Name <www.google.com>  <br /> Some Street<br /> Miami,
FL 33131<br /> 305 503 5555 </p>.
</location>
The problem is, if I use <#escape x as x?html> and put
${document.details.location} in it the it will give me:
<p> Some Hotel Name <www.google.com>  <br /> Some Street<br /> Miami,
FL 33131<br /> 305 503 5555 </p>.(including <br> <p> and etc. in the browser
)
If I generate xml and wrap that node in CDATA like here:
<location>
</location>
then I have:
Some Hotel Name
Some Street
Miami, FL 33131
305 503 5555
]]>
So the issue here I am getting "*]]>* " out of nowhere....Can someone
explain what is best practice in handling random html markup nodes so i can
be safe. Thanks in advance.
--
View this message in context: http://freemarker.624813.n4.nabble.com/html-markup-escape-and-CDATA-issue-tp4655387.html
Sent from the freemarker-user mailing list archive at Nabble.com.