Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8900647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:08:55+00:00 2026-06-15T01:08:55+00:00

Using a rss feed(syndicationfeed) I have some encoded text where normally in the view

  • 0

Using a rss feed(syndicationfeed) I have some encoded text where normally in the view I can just say @Html.Raw(feed.summary) where feed.summary is some html with text in it, and it will display the text without all the html code. However for some reason, this is not working. It’s breaking my view, no crashing its just not displaying anything. So I was wondering if there is a way to do this in code behind that way the text will all ready be stipped and I don’t have to use Html.Raw() in my view. Any advice is appreciated.

 @Html.Raw(feed.RssShortSummary) 
  //This doesn't work, it messes all my styling up and simply doesn't even display the text.

In Code behind: (I’ve tried MvcHtmlString.Create()) but still returns the html code and not the text I need from it.

   MvcHtmlString.Create(summary);

So if I have:

 <p>Here is some text</p> 

Html.Raw() will return “Here is some text” but this messes my view for some reason. I’ve tried MvcHtmlString.Create but it is still returning to me:

<p>Here is some text</p> //returning all the html instead just "Here is some text"

In code c# I tried:

  var x = MvcHtmlString.Create(rssItem.RssSummary);

where for example rssItem.RssSummary =

  <p>Here is some text</p>

x is still generating:

     <p>Here is some text</p> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:08:57+00:00Added an answer on June 15, 2026 at 1:08 am

    There are many approaches for removing tags in .net, C# Remove HTML Tags nice article in which described several approaches for removing tags, based on that article, the best approach to remove tags is StripTagsCharArray because it more faster than Regex approaches:

        /// <summary>
        /// Remove HTML tags from string using char array.
        /// </summary>
        public static string StripTagsCharArray(string source)
        {
        char[] array = new char[source.Length];
        int arrayIndex = 0;
        bool inside = false;
    
        for (int i = 0; i < source.Length; i++)
        {
            char let = source[i];
            if (let == '<')
            {
            inside = true;
            continue;
            }
            if (let == '>')
            {
            inside = false;
            continue;
            }
            if (!inside)
            {
            array[arrayIndex] = let;
            arrayIndex++;
            }
        }
        return new string(array, 0, arrayIndex);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP script that generates an RSS feed using some external data
I have just finished my latest task of creating an RSS Feed using PHP
I'm creating an RSS feed out of some articles using CakePHP, but it doesn't
I’m using the SyndicationFeed class to consume some rss feeds. I am wondering how
I am generating an RSS 2.0 feed using System.ServiceModel.Syndication.SyndicationFeed for Outlook 2007 SP2 clients,
I've created an RSS feed using Zend_Feed. It seems to have worked in that
I have an Objective C application that reads data from an RSS feed using
I have a WCF service that uses a System.ServiceModel.Syndication.SyndicationFeed to create an RSS feed.
The class below parses an rss feed and draws images/text on the screen using
I'm using this script to scrape from an rss feed to view on another

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.