Hi,
I've got an embedded component in a Razor function that renders itself and a section of <script> code.
The function works perfectly in Preview and live mode as long as I'm logged in, but when I access the page remotely the <script> tag and contents are removed from the page.
They haven't been included in the bundled script section either.
I've tried adding an ID to make sure it's not being overridden, but still no luck.
Replacing the <script> tags with [script] shows that it is indeed rendering my snippet, but my tags have been over-intelligently removed. Moving it into the <head> section made no difference either.
Is there something special about script in content for authenticated users vs anonymous?
Is there an override to tell C1 not to fiddle with my script element?
Thanks in advance,
Jason
I've got an embedded component in a Razor function that renders itself and a section of <script> code.
The function works perfectly in Preview and live mode as long as I'm logged in, but when I access the page remotely the <script> tag and contents are removed from the page.
They haven't been included in the bundled script section either.
I've tried adding an ID to make sure it's not being overridden, but still no luck.
Replacing the <script> tags with [script] shows that it is indeed rendering my snippet, but my tags have been over-intelligently removed. Moving it into the <head> section made no difference either.
Is there something special about script in content for authenticated users vs anonymous?
Is there an override to tell C1 not to fiddle with my script element?
Thanks in advance,
Jason
@inherits RazorFunction
@functions {
public override string FunctionDescription
{
get { return "Display a survey."; }
}
[FunctionParameter(Label = "Survey ID", Help = "The UUID of the survey to display.")]
public Guid SurveyID { get; set; }
}
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://www.composite.net/ns/function/1.0">
<head>
</head>
<body>
<div class="container">
<div class="survey" style="min-height: 600px;"></div>
</div>
<script id='insightjs' type='text/javascript' src='http://localhost:63342/Insight.SPA/release/insightSurvey.js'></script>
</body>
</html>