Friday, March 30, 2012

Problem returning HTMLEncoded text.

I am storing HTML inside a text field already HTMLEncoded. (example.
<body>) When I use the FOR XML EXPLICIT to return this field I get
&lt;body&gt; My text is being HTMLEncoded again.
Is there a way to prevent this from happening?
Thanks,
Ryan
Not to my knowledge, FOR XML automatically does the encoding.
Irwin Dolobowsky
Program Manager - SqlXml
http://weblogs.asp.net/irwando
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ryan Fiorini" <ryan.fiorini@.mutualofamerica.com> wrote in message
news:#o5U#iyFEHA.684@.tk2msftngp13.phx.gbl...
> I am storing HTML inside a text field already HTMLEncoded. (example.
> <body>) When I use the FOR XML EXPLICIT to return this field I get
> &lt;body&gt; My text is being HTMLEncoded again.
> Is there a way to prevent this from happening?
> Thanks,
> Ryan
>
|||Try to use the !xml directive in your FOR XML explicit query. This should
avoid entitization.
Best regards
Michael
"Irwin Dolobowsky[MS]" <irwind@.mail.microsoft.com> wrote in message
news:%233U1zw3FEHA.1600@.tk2msftngp13.phx.gbl...
> Not to my knowledge, FOR XML automatically does the encoding.
> --
> Irwin Dolobowsky
> Program Manager - SqlXml
> http://weblogs.asp.net/irwando
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Ryan Fiorini" <ryan.fiorini@.mutualofamerica.com> wrote in message
> news:#o5U#iyFEHA.684@.tk2msftngp13.phx.gbl...
get
>
sql

No comments:

Post a Comment