Skip to main content

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

Comments

41 comments

  • Rajeeva Lochana
    Immediate help please!
    0
  • cPanelLauren
    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?
    0
  • Rajeeva Lochana
    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 and the editor's suggestion.)
    0
  • Rajeeva Lochana
    I edited this and removed the error from this particular post, because I've posted it again below
    0
  • cPanelLauren
    cPanel's HTML Editor uses the CKEditor ecosystem. It does perform auto generation of HTML output which you can read about here:
    0
  • Rajeeva Lochana
    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?
    0
  • cPanelLauren
    It sounds like it's not properly seeing the NAT routing in that case, if you run the following are you able to? /scripts/build_cpnat
    Otherwise you can of course open a ticket through the cPanel customer portal here: cPanel Customer Portal
    0
  • Rajeeva Lochana
    Support Request ID is: 13707653 Hope it is solved. Please delete my previous post with my IP.
    0
  • cPanelLauren
    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.
    0
  • cPanelLauren
    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!
    0
  • Rajeeva Lochana
    HTML editor

    Aren't the "Edit" and "HTML Editor" Different? Please let me know. Are both affected with this? I am a PHP developer, I don't use the HTML Editor at all?
    0
  • Rajeeva Lochana
    Is there a way I can test by setting the old cPanel Editor (Legacy Editor) as default?
    0
  • jcn50
    Hi Guys, I found a bug in the PHP file editor when I edit this piece of PHP code: [CODE=php] ";
    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: [CODE=php] ";
    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.
    0
  • cPanelLauren
    Hello, We are aware of this issue and have the following thread open already: Thanks!
    0
  • jcn50
    Ok thank you! :)
    0
  • eliko
    It also screwed up the code for me... Please fix it urgently
    0
  • eliko
    Please fix it urgently
    0
  • cPanelLauren
    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.
    0
  • Rajeeva Lochana
    Alternatively, you could utilize a different HTML editor.

    How?
    0
  • TristanAgilisIT
    Hi cPanel Support, I would like to add to this issue as it can be pretty nasty and I am not sure the examples in this thread convey the full potential negative impact of this feature/bug. This replacement of meta tags seems to take place in PHP files as well as HTML files and this is one place where things can get particularly messy. Consider the following real-world example: [CODE=php]
    In the cPanel file editor it is automatically replaced with this: [CODE=php] " />
    You may have noticed that the substituted PHP code will now generate invalid HTML resulting in the WordPress charset not being inserted and the original self-closing portion of the tag being left as detritus in the file. The leftover remnants of the self-closing meta tag are interpreted by some browsers (such as Chrome) as text to be printed and they also trigger the immediate closure of the head tag at that point in the file. Now, it is true that self-closing is not required for void element tags and ideally would not be used but to the best of my knowledge it is permissible under the HTML5 standards and is used by many developers in a wide range of free and commercial products. Editing any of these files containing a meta tag in the cPanel editor will cause them to generate invalid HTML. It is worth noting that this also affects PHP files that generate XHTML where the self-closing of void element tags such as the meta tag IS required by the standard. I would also like to note that this code modification by the editor takes place at the time of opening so you never even see the actual file contents in the editor and there is no indication to the user that the file has been changed upon opening. The changes are of course not written to disk until the file is saved in the editor but the in-memory editor version of the file is modified at the time of opening. Now I am not trying to cast aspersions; cPanel is an amazing product and cPanel support is exemplary. However, to give my two-cents on this issue: I would much rather not have an inbuilt editor at all than have one that changes the contents of a file I am editing, especially when it does so without notifying me and doubly so when it introduces serious bugs into portions of code that I didn't even touch. I am not sure why these modifications take place and I am sure there is a good reason but as an outsider, it seems like a bad idea for an editor to make silent changes to file contents under any circumstances. To be thorough in my testing, I tried switching to the legacy editor by pressing the "Use legacy editor" button and then hitting the "Re-open" button to be sure, but this resulted in the same substitution behaviour as the new editor. Cheers, and keep up the good work.
    0
  • Sussex Web Designs
    Any news on a fix for this in upcoming update? It's a pain :D
    0
  • cPanelLauren
    This issue has not been resolved yet. As soon as there is an update to the case we'll add an update to the thread here. The thread is linked in the case as well.
    0
  • Rajeeva Lochana
    I am so happy that I informed this issue before it was too late.
    0
  • dxruss
    I'd just like to add this doesn't seem to be specifically targeting the tag. I'm experiencing this issue and on a Drupal install it is affecting an included section template:
    >

    is resulting in
    >

    So it appears it is looking for the first instance of a tag including the string "head", then adding it in after the first following > it finds?
    0
  • Rajeeva Lochana
    @cPanelLauren When is this issue going to be fixed, any soon?
    0
  • Rajeeva Lochana
    @dxruss OMG. I am so surprised to see that it also affects stuff that just have the word header. That's messed up :(
    0
  • A Hartonian
    Hello, We have the same problem on two servers. Its a bit odd as we have 23 baremetal and more than 400 VPSs. While all settings and cPanel versions are the same, there are only 2 servers (1 Baremetal and 1 KVM based VPS) having this issue. Looking forward to the fix. Thank you
    0
  • cPanelLauren
    @cPanelLauren When is this issue going to be fixed, any soon?

    I don't have a timeframe on this. The best I can do is tell you that the case is active and open right now. As soon as I have more information, I'll update the thread here.
    0
  • Rajeeva Lochana
    @cPanelLauren Thank you. I hope this is going to be fixed faster by the way.
    0

Please sign in to leave a comment.