SOLVED [CPANEL-30263] HTML changes after saving and adds charset automatically

Rajeeva Lochana

Well-Known Member
Community Guide Contributor
May 27, 2019
122
38
28
India
cPanel Access Level
Root Administrator
When I save a HTML file in the cPanel file manager, like
Code:
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="description" content="A simple website developed by Chi.C.J.Rajeeva Lochana">
    <meta name="keywords" content="HTML,CSS,XML,JavaScript">
    <meta name="author" content="Chi.C.J.Rajeeva Lochana">
    <meta name="theme-color" content="#87ceeb">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
    <link rel="stylesheet" type="text/css" href="/login/style.css">
When I open it even after saving it, it again reverts to this, it annoys me:
Code:
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  
    <meta name="description" content="A simple website developed by Chi.C.J.Rajeeva Lochana">
    <meta name="keywords" content="HTML,CSS,XML,JavaScript">
    <meta name="author" content="Chi.C.J.Rajeeva Lochana">
    <meta name="theme-color" content="#87ceeb">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
    <link rel="stylesheet" type="text/css" href="/login/style.css">
Can anyone fix this? I will open a support ticket if needed.
Similar to: HTML Editor changes code location
 
Last edited:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,272
313
Houston
Hello @rajeevacj

First I want to point out that in instances you need immediate assistance, you should always open a ticket. Second, in this case it's not actually moving the code it would appear that it's adding the rest of the html meta tag - is it causing an issue with the page?
 
  • Like
Reactions: Rajeeva Lochana

Rajeeva Lochana

Well-Known Member
Community Guide Contributor
May 27, 2019
122
38
28
India
cPanel Access Level
Root Administrator
Yes, Ok, fine :) I just referred it. And I didn't say that is the same as what I've posted :oops: One post in it is similar
The post I reference is HTML Editor changes code location
It has a meta change in it. so I just linked it.
is it causing an issue with the page?
I don't want anything to change my style of code, but it is not causing an issue.
If it cannot be removed, and will be added, I would want to add both.
(both = <meta charset="utf8"> and the editor's suggestion.)
 
Last edited:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,272
313
Houston
cPanel's HTML Editor uses the CKEditor ecosystem. It does perform auto generation of HTML output which you can read about here: HTML Output Formatting - CKEditor 4 Documentation

As far as opening a ticket, where are you doing that from? I don't have any reports of issues opening tickets today from any source.
 
  • Wow
Reactions: Rajeeva Lochana

Rajeeva Lochana

Well-Known Member
Community Guide Contributor
May 27, 2019
122
38
28
India
cPanel Access Level
Root Administrator
cPanel's HTML Editor uses the CKEditor ecosystem. It does perform auto generation of HTML output which you can read about here: HTML Output Formatting - CKEditor 4 Documentation
I use The Normal 'Edit' Button to edit html. Is it also equipped with this CKEDITOR?
cPanel's HTML Editor uses the CKEditor ecosystem. It does perform auto generation of HTML output which you can read about here: HTML Output Formatting - CKEditor 4 Documentation

As far as opening a ticket, where are you doing that from? I don't have any reports of issues opening tickets today from any source.
According to me, I think it is connecting to the cPanel from the private ip, so I think that is the problem. But I am checking with this CKEditor thing.

But, is there anyway to disable it?
 

Rajeeva Lochana

Well-Known Member
Community Guide Contributor
May 27, 2019
122
38
28
India
cPanel Access Level
Root Administrator
Full error:

Error: The system failed to create a stub ticket with the following error: API failure: (XID 6furqe) The ticket system API “POST” request to “https://tickets.cpanel.net/json-api/tickets/create-stub-ticket” failed with a “422” status code and the following error message: Input validation failedWe cannot proceed with this automated tool. You must continue the ticket creation process within the cPanel Customer Portal.

So, because of the sentence "Input validation failed", I think it is because it is requesting it from the server's private ip :)

When I clicked on the button below it saying like proceed to cpanel, it goes to the page with the private ip. So, I think setting up the server in a way that it accesses cPanel support with the main public server ip which is licensed to the server will fix this....Maybe?


Last question about editor: Can I directly access the legacy mode and check it, because when I switch to it, it displays the same thing.
 
Last edited:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,272
313
Houston
It sounds like it's not properly seeing the NAT routing in that case, if you run the following are you able to?

Code:
/scripts/build_cpnat
Otherwise you can of course open a ticket through the cPanel customer portal here: cPanel Customer Portal
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,272
313
Houston
Support Request ID is: 13707653
Hope it is solved.
Please delete my previous post with my IP.
Hello,
Thanks! I've added a note to that ticket and I'm following it. I'll update this thread with the outcome when available as well.
 
  • Like
Reactions: Rajeeva Lochana

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,272
313
Houston
I checked in on this ticket today and it appears to have resulted in an internal case CPANEL-30263 cPanel file Manager HTML editor adds obsolete HTML Tags

There isn't a workaround currently for using the HTML editor within the File Manager that will not make these changes, you'd need to modify the files using another method.

We'll update this thread when the issue is resolved/updated.

Thanks!
 

jcn50

Registered
Aug 11, 2007
4
2
53
Hi Guys,

I found a bug in the PHP file editor when I edit this piece of PHP code:
PHP:
<?php
$html_start="<html>
<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
 
</head>
<body>";
This code is correct~~ now I save the file, close the editor, but when I re-open the exact same file the editor displays this:
PHP:
<?php
$html_start="<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
</head>
<body>";
If I save that script then the PHP cannot be parsed.
It happened to me in a big & long script so it was not obvious.

Thanks.
 
  • Wow
Reactions: Rajeeva Lochana

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,272
313
Houston

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,272
313
Houston
Is there a way I can test by setting the old cPanel Editor (Legacy Editor) as default?
Please fix it urgently
As far as I know, you can use the legacy editor by selecting Edit (not edit HTML) and then select "use Legacy Editor". Alternatively, you could utilize a different HTML editor.