The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

File Manager Editor problems

Discussion in 'User Experience' started by LittleCat, Jun 4, 2014.

  1. LittleCat

    LittleCat Registered

    Joined:
    Jun 4, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hello,
    it's two weeks I have some problems with editors (text, code editor and html editor) in File Manager. Everytime I change something in some page and save it, the charset in the meta tag is changed, even though I choose another charset (iso-8859-15) which is also served by htaccess. I edited it again and again, but after saving, the page shows the undesired code.
    Another error also occurs in the same meta tag: I use xhtml, which requires tag to be closed with a slash, and that slash is always removed, so that I have

    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    and not

    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
    This is annoying because I cannot modify files on the fly, but have to change and then upload them on the server.
    Is there a solution for this?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Have you tried resetting things in the File Manager?

    On the main page of your cPanel, at bottom, is a link to reset all interface settings. Click that.
    Next, go back to File Manager and open one of these files, watch for the Encoding check popup. Click Disable button on that prompt.
    Next, close the file you just opened and note another message prompt about being Disabled. Click OK.

    Open your file again, modify it somehow, save, and see if the changes are saved proper.

    Not sure if that's helpful, but give it a go if you haven't yet.
     
  3. LittleCat

    LittleCat Registered

    Joined:
    Jun 4, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi Infopro,
    thanks for your answer. I did all you suggested. The charset now seems not changed when saving the page, but the slash is still removed
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi LittleCat, I had not actually tested your issue for myself earlier, but I did just now.

    Using the example here:
    /http://www.w3schools.com/html/html_xhtml.asp

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <title>Title of document</title>
    </head>
    
    <body>
    ......
    </body>
    
    </html>
    I created a file: test.php in File Manager. And then added that example, and your line of code that's changing on you:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
    
    <title>Title of document</title>
    </head>
    
    <body>
    ......
    </body>
    
    </html>
    Saved, refreshed File Manager, and checked the file and the code is intact.

    If I rename that file to test.html save, open to edit, save, refresh then check for the backslash, it is removed.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
    
    
    <title>Title of document</title>
    </head>
    
    <body>
    ........
    </body>
    
    </html>
     
  5. LittleCat

    LittleCat Registered

    Joined:
    Jun 4, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    The slash is always removed for me, in php and html files, when I edit and save them, not only if I rename them.
    I think it may be a problem tied in some way to character encoding: I made an attempt selecting utf-8 in the editor (even though my charset is different), and I saw that, when utf-8 is set, the code is not changed, the slash is kept.
    I don't understand why this happens, but at this moment, if this encoding gives me no problems with special characters, I think to set the editor to use it.
    Thanks a lot for your time
     
Loading...

Share This Page