Click here to get back home

Problems with "&" changing to "&"

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Problems with "&" changing to "&" Arne 05-10-2006
Get Chitika Premium
Posted by Arne on May 10, 2006, 4:37 am
Please log in for more thread options


A lot of Firefox users I know, says they have problems with validation
where the ampersand sign has to be written as & to be valid. I don't
have Firefox my self and don't wont to install it only because of this,
so I hope some of you gurus can enlighten me with this :)

In what circumstances can the "&" in the source code be involuntary
changed to "&" by a browser when or other software, when editing and
uploading the file to the web server?

E.g. writing a string like "sc_project=402887&java=0&security"
is changed to "sc_project=402887&java=0&security" when the validator is
processing the code, without the editor doing the change deliberately.

TIA

--
/Arne

Proud User of SeaMonkey. Get your free copy:
http://www.mozilla.org/projects/seamonkey/

Posted by Andy Dingley on May 10, 2006, 4:47 am
Please log in for more thread options



Arne wrote:
> A lot of Firefox users I know, says they have problems with validation

In the route from editor to server to on-line validator, just where
does Firefox (or any browser) have anything to do with it?

Your question, as stated, has too much missing from it to make any
sense.


Posted by Arne on May 10, 2006, 8:22 am
Please log in for more thread options


> Arne wrote:
>> A lot of Firefox users I know, says they have problems with
>> validation
>
> In the route from editor to server to on-line validator, just where
> does Firefox (or any browser) have anything to do with it?
>
> Your question, as stated, has too much missing from it to make any
> sense.
>

Yes, I do belive it's a bit difficult to understand. :)
I'll try with an example as it is described to me.

On a remote visitor tracker site (statcounter.com) when the tracker code
that is to be pasted on a page, is generated using Firefox, the code to
copy is shown in a text box. Part of the code is what I used in my
initial post ("sc_project=402887&java=0&security"). In my browser and
also in IE, this part shows the ampersands as "&".

When I look at the source code for the page where the box with the
generated code is, the ampersand shows as "&amp", but when I
validate the page, the W3C validator also complains about the "&", where
the "&" (or "&amp") should be.

This page is HTML 4.0 Transitional with 9 errors, and most of the errors
(6-7) is because of the ampersand is not shown as "&"

I know it's hard to understand this, and I for sure have no idea. I was
hoping somebody could have some theory what's happening. :)

--
/Arne

Proud User of SeaMonkey. Get your free copy:
http://www.mozilla.org/projects/seamonkey/

Posted by Neredbojias on May 10, 2006, 10:43 am
Please log in for more thread options


vouchsafed:

> When I look at the source code for the page where the box with the
> generated code is, the ampersand shows as "&amp", but when I
> validate the page, the W3C validator also complains about the "&", where
> the "&" (or "&amp") should be.

What do you mean "should be"? You just said "&amp" was in the source
code. This would display "&amp" in the viewport. So where does the lone
"&" come from? (Btw, note that the "&amp" is incorrect. It should be
"&".)

--
Neredbojias
Infinity has its limits.

Posted by Harlan Messinger on May 10, 2006, 10:45 am
Please log in for more thread options


Arne wrote:
>> Arne wrote:
>>> A lot of Firefox users I know, says they have problems with
>>> validation
>> In the route from editor to server to on-line validator, just where
>> does Firefox (or any browser) have anything to do with it?
>>
>> Your question, as stated, has too much missing from it to make any
>> sense.
>>
>
> Yes, I do belive it's a bit difficult to understand. :)
> I'll try with an example as it is described to me.
>
> On a remote visitor tracker site (statcounter.com) when the tracker code
> that is to be pasted on a page, is generated using Firefox, the code to
> copy is shown in a text box. Part of the code is what I used in my
> initial post ("sc_project=402887&java=0&security"). In my browser and
> also in IE, this part shows the ampersands as "&".
>
> When I look at the source code for the page where the box with the
> generated code is, the ampersand shows as "&amp", but when I
> validate the page, the W3C validator also complains about the "&", where
> the "&" (or "&amp") should be.
>
> This page is HTML 4.0 Transitional with 9 errors, and most of the errors
> (6-7) is because of the ampersand is not shown as "&"
>
> I know it's hard to understand this, and I for sure have no idea. I was
> hoping somebody could have some theory what's happening. :)

I'm still having trouble understanding, but try this: if you have
"&" in your string, and you need it to read as "&" in the
browser, then you need to change it to "&". Not "&amp", as
you wrote twice, but "&". "&amp" will be interpreted as
"&amp", which is indeed invalid.

Similar ThreadsPosted
Changing all pages at once? July 23, 2004, 1:34 pm
changing border for tr May 31, 2006, 6:07 pm
fix problem by changing hosts October 29, 2004, 6:51 pm
Changing 2 frames in one click November 16, 2004, 7:15 am
Another question on changing 2 frames November 16, 2004, 7:42 am
Changing the outerHTML of an Iframe April 11, 2006, 1:56 am
Automatically changing the hue of a jpg in html page August 11, 2004, 9:43 pm
Changing background color of a frameset June 17, 2005, 2:16 pm
Changing test with serverside includes February 11, 2006, 11:45 am
Changing Cellspacing in a single column only March 27, 2007, 12:13 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap