Solved

HTML File - Saving

Posted on 2004-04-26
8
565 Views
Last Modified: 2011-10-03
I have an HTML. When I open it and save as HTML in a browser, all "<", ">" etc. are getting converted to some text. Here is a sample:

Original text:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML version="-//W3C//DTD HTML 4.01 Transitional//EN"><HEAD><TITLE>MLiFlow 2.0 Converted Document</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"><LINK
href="c:\skv\txt\TUDstyle.css" type=text/css rel=stylesheet></LINK>
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY>
<DIV class=head>

After saving:

+/v8APAAh-DOCTYPE HTML PUBLIC +ACI--//W3C//DTD HTML 4.0 Transitional//EN+ACIAPg-
+ADw-HTML version+AD0AIg--//W3C//DTD HTML 4.01 Transitional//EN+ACIAPgA8-HEAD+AD4APA-TITLE+AD4-MLiFlow 2.0 Converted Document+ADw-/TITLE+AD4-
+ADw-META http-equiv+AD0-Content-Type content+AD0AIg-text/html+ADs- charset+AD0-utf-7+ACIAPgA8-LINK
href+AD0AIg-c:+AFw-skv+AFw-txt+AFw-TUDstyle.css+ACI- type+AD0-text/css rel+AD0-stylesheet+AD4APA-/LINK+AD4-
+ADw-META content+AD0AIg-MSHTML 6.00.2600.0+ACI- name+AD0-GENERATOR+AD4APA-/HEAD+AD4-
+ADw-BODY+AD4-
+ADw-DIV class+AD0-head+AD4-

Is there any patch or update to correct the above thing. Is there any IE update that i'm missing. Kindly help me.
0
Comment
Question by:vi_srikanth
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 7

Accepted Solution

by:
MaB earned 400 total points
Comment Utility
Hi vi_srikanth,
Sounds like you're using some encoding that isn't supported in your OS. Could you describe the exact steps you take to save as HTML.
(Are you from the browser window choosing "file-save as" and then in the dialogue "save as type" choose HTML.)

If so, try choose some other encoding in the selectbox beneath "save as type". Or go for "view-source" which should open the page in notepad and then save from there to a something.htm file.

BR MaB!
0
 
LVL 7

Assisted Solution

by:mark-b
mark-b earned 50 total points
Comment Utility
How about viewing the source in an editor and saving it?

Right Click (View -> Source on IE menu) or -> View Source (opens in your editor-- most likely notepad) -> Save

-Mark
0
 
LVL 7

Expert Comment

by:mark-b
Comment Utility
Oh.. I see MaB already suggested this.  Sorry!
0
 
LVL 7

Expert Comment

by:MaB
Comment Utility
no problem mark-b :-)
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 10

Assisted Solution

by:stu215
stu215 earned 50 total points
Comment Utility
Best bet would be to copy it all, and paste it into notepad, then save it and change the extension from .txt to .html

    as mark-b pointed out ....

~Stu :-)
0
 
LVL 10

Expert Comment

by:stu215
Comment Utility
doh i mean Mab, Im blind today apparently ...

~Stu
0
 
LVL 4

Author Comment

by:vi_srikanth
Comment Utility
Hi friends

Thanx for ur comments.

The above thing( +/v8APAAh . . . ) that I said, is what when I open the source of the htm file - thru IE - view source.

I missed one thing!
> When I open it and save as HTML in a browser
This opening and saving the HTML is done in an HTML editor that is designed by me. Before opening the HTML in my editor, it is perfect. And only after opening, and after correcting something in the HTML - the abovesaid problem happens.

I tried this way: I opened the HTML in IE, and then did that "Save As" to another file. Then, if I open that in my editor and did some change, it is perfect. IE "Save As" does some normalization which solves my problem.

Is there anyway to do this normalization programatically? In other words, is there any converter/commands that I can use to normalize an HTML?

Thanx
0
 
LVL 7

Expert Comment

by:MaB
Comment Utility
Is there anyway to do this normalization programatically? In other words, is there any converter/commands that I can use to normalize an HTML?

Not that I know of. The problem has to do with the encoding your HTML editor uses. Notepad uses ASCII and doesn't add any formatting, that's one reason it's good for cut and paste when working with HTML.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now