473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Strip HTML from Text

Is there an easy way to strip HTML tags from Text to get just the plain
text?

I am using a program called FreeTextBox that lets you format Text in a
TextBox. It does this by adding HTML tags (<b>, <u>,<span> etc) to the
code.

The problem is that it is a problem since I am putting the text in a
varChar(8000). The HTML adds a lot characters to the text. I can change
this to a Text field in Sql, but you can do a FullText search on a Text
field (plus I don't really want the tags in a Text Search).

Is there some filtering mechanism that would strip the HTML from a text
field?

Thanks,

Tom
Mar 2 '06 #1
2 2613
Here's a complete sample :

http://www.experience247.com/srcview...mlIn.cs&font=3

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there an easy way to strip HTML tags from Text to get just the plain text?

I am using a program called FreeTextBox that lets you format Text in a TextBox. It does this by
adding HTML tags (<b>, <u>,<span> etc) to the code.

The problem is that it is a problem since I am putting the text in a varChar(8000). The HTML adds
a lot characters to the text. I can change this to a Text field in Sql, but you can do a FullText
search on a Text field (plus I don't really want the tags in a Text Search).

Is there some filtering mechanism that would strip the HTML from a text field?

Thanks,

Tom

Mar 2 '06 #2
That does what I was looking for.

Thanks,

Tom
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OM**************@TK2MSFTNGP09.phx.gbl...
Here's a complete sample :

http://www.experience247.com/srcview...mlIn.cs&font=3

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there an easy way to strip HTML tags from Text to get just the plain
text?

I am using a program called FreeTextBox that lets you format Text in a
TextBox. It does this by adding HTML tags (<b>, <u>,<span> etc) to the
code.

The problem is that it is a problem since I am putting the text in a
varChar(8000). The HTML adds a lot characters to the text. I can change
this to a Text field in Sql, but you can do a FullText search on a Text
field (plus I don't really want the tags in a Text Search).

Is there some filtering mechanism that would strip the HTML from a text
field?

Thanks,

Tom


Mar 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mark Miller | last post by:
I have a scheduled job that uses different XSL templates to transform XML and save it to disk. I am having problems with the code below. The problem shows up on both my development machine (Windows...
2
by: AdamD | last post by:
Does anyone have an example of how to strip HTML tags from an laready existing text file Thanks
1
by: John Grandy | last post by:
Let's say I'm writing an app where various 3rd parties provide content. In code, I store their content in strings. The content typically is plain text , but some providers add-in snippets of...
3
by: Michal A. Valasek | last post by:
Hello, I want to transform text with HTML markup to plain text. Is there some simple way how to do it? I can surely write my own function, which would simply strip everything with < and >....
5
by: vMike | last post by:
Is there any benefit to stripping all the space from the page before rendering by overriding the page render and using the htmltextwriter and stringbuilder to strip linefeeds, tabs and extra space...
0
by: Brian Henry | last post by:
I thought this was useful, its a extender i just wrote for the new .NET menu strip and status strip to extend the menu items to add a status message so when a mouse rolls over the item it displays...
4
by: Steve | last post by:
Hi, I'm a complete PHP n00b slowly finding my way around I'm using the following function that I found on php.net to strip out html and return only the text. It works well except for when you...
3
by: Simon | last post by:
Hi We have an application that needs to just get the text that you would 'see' when you open a webpage in Internet Explorer with no code. Is it possible to strip out the html tags from the...
6
by: george | last post by:
hello, which is the best way to strip jscript/vbscript from user input? Is there any module I could reuse? thanks in advance george P.S. the solution must allow users to enter html code.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.