Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Render Block in XhtmlString field



I use Episerver 11 and a standalone Nuxt front-end. I having problem rendering blocks (which are Vue components) in XhtmlString field. 

It work well when I write the same code into Views/shared/cshtml, but I want to do it with a standalone front-end.

Does anyone have experience with this?

Oct 23, 2019 14:33

Hi Eirik

Can you post a sample of the rendered (wrong) markup, so we can have a look and figure out the issue?

Oct 30, 2019 7:34
Eirik - Oct 30, 2019 12:26
Here is my postman output when im rendering blocks in XhtmlString:

"content": "

Here is some text....


Here is some text....


Here is some text....

\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\n

More text...

\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n",

"content": = XhtmlString
n\r\n\r\n = blocks placed in XhtmlString 

I tried this link. I was able to get n\r\n\r out of blocks in content.

In this situation I have two block placed in Xhtml. 
I've tried to display this data cshtml, but didn't find any solution to display those blocks. 

Have not tried this yet tho, I just found the blogpost:

* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.