This is a migrated thread and some comments may be shown as answers.

Textarea value rendering as HTML

1 Answer 353 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonathan
Top achievements
Rank 1
Jonathan asked on 03 Jun 2011, 07:03 PM
Hi, was wondering if anyone else has ran into this or knows of a solution.  My db holds content as <img src="foobar"> and when I retrieve it and place as value in editor, 100% it does escape it properly so I can actually see the html without it rendering as html.  There are anomalies in this experience when the data, even though escaped, still continues to render as html.  I'm trying to always just get the content of this field to be straight up html code but to never have it rendered.

Here is a snippet of the  HTML source showing that the Textarea that does get generated is escaped properly.  This example renders as HTML where i want it to be just like we see it.
<textarea class="t-content t-raw-content" cols="20" id="ImageTableContent-value" name="ImageTableContent" rows="5" title="ImageTableContent">&lt;ul class=&quot;img-block&quot;&gt;&lt;li&gt;&lt;div class=&quot;item&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;../../content/images/MIL_PBA_chart_1.png&quot; /&gt;&lt;/div&gt;&......
See image telerik_editor_bad.jpg

Here is a snippet of the HTML source that does show the intended experience, where it does not render as HTML
textarea class="t-content t-raw-content" cols="20" id="ImageTableContent-value" name="ImageTableContent" rows="5" title="ImageTableContent">&lt;ul class=&quot;img-block&quot;&gt;&lt;li&gt;&lt;div class=&quot;item&quot;&gt;
&lt;img src=&quot;../../content/images/MIL_PBA_chart_2.png&quot; alt=&quot;&quot; /&gt;.....
See image telerik_editor_good.jpg

Thanks for help and any insights in advance!
Jonathan

1 Answer, 1 is accepted

Sort by
0
Jacob
Top achievements
Rank 1
answered on 06 Jun 2011, 08:05 AM
Hey there, maybe the solution in this post would help you
Tags
Editor
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Jacob
Top achievements
Rank 1
Share this question
or