Why is server changing my HTML code?

Status
Not open for further replies.

cletusshagnasty

New Member
Messages
6
Reaction score
0
Points
0
I set up a very simple test page in my domain yesterday - just a hello world page - and was astonished to find that the source code of the file was changed quite dramatically after I'd saved it. My Doctype was changed to XHTML 1.1 from HTML 4.01 Strict and a <script> tag and two <link> tags were added as well. I didn't want any of those changes and I still don't.

Can anyone tell me why the server is changing my code? How do I make it stop?
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
I set up a very simple test page in my domain yesterday - just a hello world page - and was astonished to find that the source code of the file was changed quite dramatically after I'd saved it. My Doctype was changed to XHTML 1.1 from HTML 4.01 Strict and a <script> tag and two <link> tags were added as well. I didn\'t want any of those changes and I still don\'t.

Can anyone tell me why the server is changing my code? How do I make it stop?

Generally the server won't change the web pages. Can you provide us the link to the page.
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
System shows me your Forums account is not linked with hosting account. When did you register???

are you able to access Account Panel??
 

The Real Rebel

New Member
Messages
336
Reaction score
10
Points
0
Just to confirm, The server should never change peoples html code, It may not have saved correctly or otherwise.
 

cletusshagnasty

New Member
Messages
6
Reaction score
0
Points
0
Just to confirm, The server should never change peoples html code, It may not have saved correctly or otherwise.


This is REALLY getting frustrating. I posted on this issue yesterday and came back today to check for an answer. I couldn't find the question despite a thorough search so I posted it again this morning. This time, my new post is visible on the forum but my REPLIES to your requests for more information are not appearing. A little while ago, I posted a reply to your request for a URL and also to Boss's question about my forum account. NEITHER answer is appearing in the forum! I don't know whether you are seeing them and I am not or if my replies are not visible to you either. I could take the time to write the replies again but I don't know if THOSE replies are going to appear either!

How the heck are you supposed to help me if the system loses the replies in the forum??? We're BOTH screwed if we don't have a reliable communication tool, namely the forums.....

Anyway, on the off chance that THIS reply will appear, one file that illustrates the problem is http://sandbox.cletus.x10hosting.com/index.shtml. When I saved the file, it contained this (or something VERY close to this):

===
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title>Index</title>
</head>
<body bgcolor="#fc0">
<h1>Welcome to index.shtml!</h1>
</body>
</html>
===

But now, the DOCTYPE has been changed to XHTML, two <link> tags have been added and one <script> tag has been added. I didn't want ANY of those changes.

Do you have any idea how to prevent the server from changing my code?

Also, do you have any idea why my forum posts/replies are not appearing half the time??
 

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
Could you tell us the exact steps you are using to create the file and upload it? i.e. What applications, webpages, etc.
 

AngusThermopyle

Active Member
Messages
319
Reaction score
52
Points
28
It doesn't seem to do this on your main domain.
May I ask why you are using .shtml ? You know that the server does parse your page when you use that extension? Not saying that is the source of the code.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83

cletusshagnasty

New Member
Messages
6
Reaction score
0
Points
0
Could you tell us the exact steps you are using to create the file and upload it? i.e. What applications, webpages, etc.

I didn't do anything exotic. All I did was:
1. sign in to cPanel for my domain, cletus.x10hosting.com,
2. opened File Manager,
3. switched to the sandbox subdomain,
4. created a new file called index.shtml,
5. opened the HTML editor on it,
6. typed in the code I mentioned in the other reply, and
7. saved the file.

A moment later, I used my browser to display the page at http://sandbox.cletus.x10domain.com/index.shtml and it displayed fine. However, when I did a "view source" on the page, I saw that it had replaced my DOCTYPE and added two new <link> tags and one new <script> tag.

I didn't get any error or warning messages along the way. I can't think of any way that my file could have changed as a result of anything _I_ did. I can only assume that the server somehow overwrote it but I don't understand why. Do you folks have some kind of logic in the HTML Editor that assumes the user is a newbie and that overwrites his work to use a standard doctype that you specify and also adds the link and script tags? Otherwise, I'm not sure how the server would have changed it either!
 

kaepos

New Member
Messages
24
Reaction score
0
Points
0
The server shouldn't have changed your code. Have you checked the actual file? If not, then you probably should. If you're just looking at through the "view source code" feature in a browser, you will see the code the browser thinks it sees.

Go to any site and you'll see html code in places where there's obviously dynamic code.
 

eyemdee

New Member
Messages
53
Reaction score
1
Points
0
The server shouldn't have changed your code. Have you checked the actual file? If not, then you probably should. If you're just looking at through the "view source code" feature in a browser, you will see the code the browser thinks it sees.

Go to any site and you'll see html code in places where there's obviously dynamic code.

I agree - download the file using FTP and then open it with something like Notepad. If it has changed, then it could be the cPanel HTML editor causing the change. Use Notepad to create a new file then upload it with FTP and see whether it still changes.
 
Status
Not open for further replies.
Top