Razor sometimes returns DynamicXML instead of string for rich text property
Hi,
I think the following is a bug in the razor implementation: I have a rich text property using tinyMce. When I enter some text (text, paragraphs, etc) and output with
@Model.myRichtTextProperty
everything works fine.
However, if I enter 2 lines of text and use the unordered list button of tinymce, I get
umbraco.MacroEngines.DynamicXml
as output of the above razor instruction.
The very same content displays correctly when using
As soon as I enter a paragraph before the list, the output is fine. It would seem that Umbraco's razor implementation returns DynamicXml when the content of a property starts with <ul>. This of course makes it impossible to use razor syntax for rich text properties.
Is this a known bug, or did I miss something? Is there a simple way to handle that, or will I need to implement and call a helper function whenever I'll want to use a rich text property?
Razor sometimes returns DynamicXML instead of string for rich text property
Hi,
I think the following is a bug in the razor implementation: I have a rich text property using tinyMce. When I enter some text (text, paragraphs, etc) and output with
everything works fine.
However, if I enter 2 lines of text and use the unordered list button of tinymce, I get
as output of the above razor instruction.
The very same content displays correctly when using
I checked umbraco.config, it contains something like:
As soon as I enter a paragraph before the list, the output is fine. It would seem that Umbraco's razor implementation returns DynamicXml when the content of a property starts with <ul>. This of course makes it impossible to use razor syntax for rich text properties.
Is this a known bug, or did I miss something? Is there a simple way to handle that, or will I need to implement and call a helper function whenever I'll want to use a rich text property?
Do check the umbracoSettings.config file to make sure the scripting node is in there and has all of the elements in there:
And there's also an extra bugfix upcoming in 4.7.1.
you're right, it happens to me too
Excellent - I didn't know about that setting. Thanks a lot!
i didn't know about it either, too bad this thing ain't documented on a change log when 4.7 released (which doesn't exist)
You're right, it should definitely be in the changelog.
hi all!
running 4.7.1 and getting exactly the same issue with this code where staffIntroText is a richtext editor field..
@if(staffMember.HasProperty("staffIntroText") && !string.IsNullOrEmpty(staffMember.staffIntroText.ToString())) {
<div class="intro-text">
@staffMember.staffIntroText
</div>
}
I have set up my umbraco config as specified above..
ah the pre tag got in the way
is working on a reply...