$ 0 0 Another easier suggestion... set the returntype of the Razor function to typeof(string) and all the content will never be parsed as xml.