Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have this textarea property value that I want shown in a partial view.
@(item.GetPropertyValue("sommerhusKortBeskrivelse"))
But when i load up my page, i get this result:
http://i.imgur.com/TefDclH.png
With the p and span tags showing in the body text. If i try to wrap the property value in a p tag, i get the same result.
How do i display just the text of the property value?
Textareas are meant for plain text, not HTML. By default all content added to a text area is HTML encoded (for security).
If you want HTML use a rich-text editor datatype and if you want plain text use a text area.
If you really want to render HTML in a textarea then use:
@Html.Raw(item.GetPropertyValue("sommerhusKortBeskrivelse"))
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Textarea datatype displaying <p><span> tags when shown in a partial view
I have this textarea property value that I want shown in a partial view.
But when i load up my page, i get this result:
http://i.imgur.com/TefDclH.png
With the p and span tags showing in the body text. If i try to wrap the property value in a p tag, i get the same result.
How do i display just the text of the property value?
Textareas are meant for plain text, not HTML. By default all content added to a text area is HTML encoded (for security).
If you want HTML use a rich-text editor datatype and if you want plain text use a text area.
If you really want to render HTML in a textarea then use:
is working on a reply...