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.

Is there anyway to fix this problem?

Discussion in 'General Discussion' started by happystinky, Apr 17, 2004.

  1. happystinky

    happystinky Registered

    Joined:
    Apr 17, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Roanoke, TX
    Hi,

    Is there anyway to fix this problem?

    If I use an amperand (&) in a javascript that is contained between <!-- remark brackets --> in my HTML, anytime I use Cpanel to edit the file, Cpanel automatically changes & to & n b s p; (without the spaces). This breaks my code and it won't work.

    For example, when I first put in a code like:

    Code:
    <!--
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0[COLOR=red]&&[/COLOR]parent.frames.length) {
    -->
    and save, it is fine. But if I reopen the file in Cpanel for editing and then save it again, the code would be automatically changed to this:

    Code:
    <!--
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0[COLOR=red]& amp;& amp;[/COLOR]parent.frames.length) {
    -->
    (Don't pay attention to the space between the & and the amp; I had to add a space because this forum won't print what I type. It changes it to the html equivelant, &).

    As you can see, the Cpanel has replaced each & sign with the Code Name equivelant, & nbsp; (without the space) which breaks my code.

    Any ideas?

    Thanks in advance...
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    The cpanel editor automatically replaces certain characters with the code for it. For this reason, the cpanel editor can not be used to edit pages that contain anything more than simple html code.

    There is no way around this until cpanel improves their editor, but I assume it's mostly designed for simple work for those who are fairly new to html. You're better off using a seperate editing program.
     
  3. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
  4. happystinky

    happystinky Registered

    Joined:
    Apr 17, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Roanoke, TX
    Okay - thanks. Guess I'll just do all my editing in Dreamweaver or something. Just sure seems like a hassle. Oh well. Thanks again...
     
Loading...

Share This Page