Cool HTML Tag and Attribute Online Stripper v. 1.1d

Created: April 22, 2011
Last Modified: May 4, 2013
Subscribe to Internet Tips and Tools Feed

I created this HTML stripper mainly because of the mess that programs like Word and Excel make out of HTML when you try to save a document as html or convert it to html. They make some very messy redundant html code. So this online HTML tag and attribute stripper removes all tags and attributes except for the ones you specify to allow.


Allowed Tags:

Allowed Attributes:

Also check out:
HTML to BBCODE Converter
HTML Entity to Text Converter
Sea Breeze Computers Home Page

Copyright © 2011 by Jeff Baker

History

5/4/2013 - ver 1.1e - Again, MS word smart quotes were not being converted! I still don't know why this is happening. So I combined the old method with the new method for converting smart quotes and again they are converting properly.

3/15/2013 - ver 1.1d - Increased the character limit to 100,000 characters on a trial basis.

3/5/2013 - ver 1.1c - Bug Fix - I noticed that MS Word Smart quotes or curly quotes were no longer being converted correctly. I am not sure why. Maybe it was a server upgrade. So I changed to a hex way of converting smart quotes. So now MS Word "quotes" 'single quotes' dashes - and ... should convert properly.

10/05/2011 - ver. 1.1b - Bug Fix - The stripper was not removing attributes if they were on a new line. That has been fixed. For example, previously for the statement:

<a href="www.sample.com"
onclick="javascript">
the onlcick would not be removed because it was on a newline. Now it will be removed unless onclick is in the Allowed Attributes field.

08/24/2011 - ver. 1.1 - Increased the character limit to 30000 characters. Also the HTML Stripper now removes MS Word smart quotes and dashes from the document. If you are seeing the unicode replacement character FFFD in your html document then use this html tag stripper to remove it.

04/22/2011 - ver. 1.0 - Online HTML Tag and Attribute Stripper Created. Note: The HTML source is limited to 20000 characters. Tags that do not have a corresponding closing tag are also properly closed.

Back to www.seabreezecomputers.com
Subscribe to Internet Tips and Tools Feed

User Comments

There are 13 comments.

Displaying first 35 comments.

1. Posted By: riverstore - - July 20, 2011, 8:00 pm
Thanks for the great tool! I use it to clean MS Word HTML

2. Posted By: Rob Anderson - - December 17, 2011, 3:18 pm
Just what I was looking for - thanks for making this available!

3. Posted By: Raphael - - November 12, 2012, 5:00 pm
Thanks a lot of this great script. I just had to clean up the most ugly code know to man, I don't know how I would of done it with you.

Revolution Graphics

4. Posted By: Nathan Kinsler - - January 29, 2013, 6:43 am
Excellent tool. This has saved us a lot of time. Thanks for sharing this.

BR.

Nathan.

5. Posted By: Robert Rudolf - - February 3, 2013, 2:03 am
Thank you! I was desperate to find a tool like this. Great work.

6. Posted By: Jeremy Ratliff - - February 8, 2013, 7:48 am
Thank you for this awesome tool, I too use it to clean up nasty MS Word HTML formatting.

7. Posted By: sebastiano - - March 8, 2013, 5:56 pm
thank you very much for this, but could you remove the html code size limit? I have very big articles and your script cut them. Hope you can help.

8. Posted By: al bundy - - March 12, 2013, 9:19 pm
Thank you, but the tool can't handle 190kb.

9. Posted By: Alex - - March 20, 2013, 3:22 am
Hi Jeff!

Cool thing!
Can you give the code of this webtool to use it only in my intranet-webpage?

Thank you very much.
With best regards, Alex Golovlev.
E:mail: a_g0[at]mail[dot]ru

10. Posted By: Nik - - March 24, 2013, 9:01 am
Nice tools, but it is stripping the class attribute out of span elements, when span is an element to not strip, and id and class are attributes not to strip

11. Posted By: Jeff - - March 25, 2013, 8:00 pm
Hi Nik,

I'm not sure why that is happening to you. If I list <span> in the allowed tags and class in the allowed attributes then the html stripper does not strip them for me. Maybe you could provide some of the code you are trying and I can try and see why you are having a problem.

Jeff
www.seabreezecomputers.com/

12. Posted By: Nik - - March 26, 2013, 11:37 am
Jeff, sorry, I tried to edit my comment but didn't want to spam your blog with comments. I was missing a comma between two of the attributes and this was throwing it off. Once I fixed that it worked perfectly!

Regards,

Nik

13. Posted By: Hardik Sondagar - - May 10, 2013, 6:12 am
IF anyone looking for similar things with source code.
then check this www.htmltagstripper.com