Re: html markup escape and CDATA issue
Daniel Dekany <[email protected]> Tue, 3 Mar 2015 22:21:07 +0100
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
I don't understand what you trying to say. If you don't want to escape
the output, then why are you using #escalpe (or why don't you use
#noescape)? Where do you put that CDATA section and how?
Tuesday, March 3, 2015, 9:31:22 PM, FOX427 wrote:
> 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.
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>
--
Thanks,
Daniel Dekany
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/