Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Oct 2003
    Posts
    9

    Default cpanel file manager editing files - updated to show the problem

    Hi,

    If i use the cpanel (8.5.4-RELEASE #7) file manger to edit html files that contain javascript then any & characters get expanded to & amp (without the space) when edited if they are between the javascript tags and when the file is saved the get saved to disk as &amp

    e.g.
    <script language="JavaScript">
    <!--

    any & contained in code here gets expanded to & amp (witthout the space)

    // -->
    </script>

    Is there anyway to stop this happening?
    Last edited by knightsfield1; 11-01-2003 at 08:20 AM.
    Robert

  2. #2
    Member
    Join Date
    Sep 2003
    Posts
    389

    Default RE: cpanel file manager editing files

    Dear knightsfield1,

    What characters get expanded to what? & ? I never find any problem with file manager saving special characters inside javascript tags.

    Regards,

  3. #3
    Member
    Join Date
    Oct 2003
    Posts
    9

    Default

    Hi,

    As an example given the following made up code in a html file:

    <html>
    <body>
    <script language="JavaScript">
    <!--
    if (x && y)
    {
    }
    // -->
    </script>
    </body>
    </html>

    when I use the edit function using the file manager, it gets displayed in the browser IE6 (or opera 7.10) as:
    <html>
    <body>
    <script language="JavaScript">
    <!--
    if (x & amp;& amp; y) *
    {
    }
    // -->
    </script>
    </body>
    </html>

    if i then save the file, and check the file the & characters have been changed to & amp;

    * the actual text has no space between the & and amp but i've no idea how I can display that on here
    Last edited by knightsfield1; 11-01-2003 at 08:07 AM.
    Robert

  4. #4
    Member
    Join Date
    Oct 2003
    Posts
    49

    Default

    G'day knightsfield1

    A client with java on every page of two web hosting accounts with us has reported exactly the same problem.

    We tested File Manager with various browsers, and found there is in fact a bug in the program - probably a WYSIWYG issue.

    The unwanted characters are added to every occurance of the character "&" on the page as soon as you click the "Edit file" option. If you exit "Edit file" screen without saving, the page remains the same. If you hit the "Save" button the errors are saved on the page.

    EXAMPLE (Java extract)

    ++++++ Start ++++++

    if ( browserName == "Netscape" && browserVer >= 3 ) version = "n3";
    if ( browserName == "Microsoft Internet Explorer" && browserVer >=4 ) version = "e4";

    becomes

    if ( browserName == "Netscape" & amp;& amp; browserVer >= 3 ) version = "n3";
    if ( browserName == "Microsoft Internet Explorer" & amp;& amp; browserVer >=4 ) version = "e4";

    ++++++ End ++++++

    We're considering disabling File Manager from all client accounts.

    Shame really. You'd think it would be a relatively simple debug to stop the thing messing with code in a script tag.

    Would appreciate news of any fixes on the horizon.

    Ulysses

Similar Threads & Tags
Similar threads

  1. Editing HTML files in cPanel File Manager
    By SXR1337 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-03-2008, 08:46 AM
  2. Disk space used prevents editing in mail and file manager
    By host4all in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-16-2007, 05:56 AM
  3. Do your customers use FTP or cPanel File Manager to manage their files?
    By Roy@ENHOST in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-18-2006, 09:33 PM
  4. ÁÁÁ error when editing files in file manager
    By sambates in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-25-2006, 08:17 AM
  5. Cpanel File Manager (viewing files trouble
    By Tianne in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 05-24-2004, 09:58 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube