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
Hi i have a cshtml file..
I know to use @: for a line of text.. just wondering how you render that for a block of text..
it keeps interpreting my js function as something else..
var cleanResults = data.results[0].replace(/<?\/body[^>]*>/g,''); cleanResults = cleanResults.replace(/[\r|\n]+/g,''); cleanResults = cleanResults.replace(/<--[\S\s]*?-->/g,''); cleanResults = cleanResults.replace(/<noscript[^>]*>[\S\s]*?<\/noscript>/g,''); cleanResults = cleanResults.replace(/<script[^>]*>[\S\s]*?<\/script>/g,''); cleanResults = cleanResults.replace(/<script.*\/>/,'');
Hi Tom,
If I understand your question correctly, you can put your js inside text tags like this:
<text> var cleanResults = data.results[0].replace(/<?\/body[^>]*>/g,''); cleanResults = cleanResults.replace(/[\r|\n]+/g,''); cleanResults = cleanResults.replace(/<--[\S\s]*?-->/g,'');</text>
Hope that helps.
David
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
force umbraco razor to render as text
Hi i have a cshtml file..
I know to use @: for a line of text.. just wondering how you render that for a block of text..
it keeps interpreting my js function as something else..
Hi Tom,
If I understand your question correctly, you can put your js inside text tags like this:
Hope that helps.
David
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.