0

I am using Sitecore 9.0.1 with SXA 1.7. I have created a Multiline text field and it has a script inside it. The script inside is getting deleted by itself after some time. Any solution for this and the reason behind it?

enter image description here

Except "lang:en_US " other scripts will get deleted by itself.

Thank you

1
  • Are you using @Html.Raw() in view? ANd i think SXA has Html component too that could help.
    – Kamil
    Jul 30 at 23:11
1

The default behavior for a Sitecore RichText field is to strip out all script tags from the markup.

This setting controls the behavior:

<setting name="HtmlEditor.RemoveScripts" value="true" />

If you want to enable script tags, you would need to change that setting.

4
  • The field type which i used here is multiline and i tried with rich text also but same thing happened in rich text too.Can you please share the file name where can i find this setting.@Richard Seal
    – Vinaya
    Jul 31 at 11:36
  • its within the sitecore.config file Jul 31 at 17:30
  • if i make it false , will this gets changed to default value(true) when SXA upgrade takes place? @Jean Nicolas G
    – Vinaya
    Aug 2 at 6:16
  • yes. always use patch file when playing around default config Aug 2 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.