Ampersand Issue in firefox 3.5

Posted on 2010-01-04
Last Modified: 2012-05-08

Here's my issue -

In IE 8, a URL shows up as -


But in firefox it shows up in the URL as -


The difference is in IE8 we see "&" in the URL and in FF 3.5 they are seen as "&".

I am using a module in Joomla CMS named RokStories and the line in the PHP file I have narrowed down to is -

RokStoriesLinks['rokstories-<?php echo $module->id; ?>'].push('<?php echo $item->link; ?>');

I think its that link that something goes wron with in firefox.

appreciate any help.


Question by:USBDev
    LVL 34

    Expert Comment

    by:Beverley Portlock
    It depends where this link is showing up. If it shows in the address bar at the top of FireFox as


    then that is a little screwy. However, this is the correct format for a link embedded in an HTML page because the &amp; stops the link being mistaken for an HTML entity. When the link is clicked the browser knows to recode the &amp; as & and this happens before it is loaded into the address bar and displayed at the top.

    Can you post a link to the page that concerns you? Better still, run it through the W3C page validator at

    Author Comment

    The site is a bit confidential at the moment. Can I PM you? How do I?
    LVL 34

    Expert Comment

    by:Beverley Portlock
    Send an email to brian.portlock at google mail dot  c o m

    I rarely use it for emails but I will make a point of logging to check it over the next day or two.
    LVL 34

    Accepted Solution

    USBDev - thanks for the email. Having had a look at the page I don't see any obvious problems with the links, the only feature I do not like is the fact that ":" are appearing in the URL parameters and these are usually encoded as %3A but I don't know if that will be a problem.

    On the other hand, there are lots of problems with the HTML and CSS and these will cause major problems. The CSS is quite simple so I have posted the errors below with the domain changed to "mydomain"

    URI :
    24   #sbox-window   Property -moz-border-radius doesn't exist : 3px

    URI :
    262  div.itemCommentsForm form input.button  Value Error : font-size Unknown dimension 16x

    URI :
    566       Value Error : color #fff0000 is not a valid color 3 or 6 hexadecimals numbers #FFF0000

    Your HTML also has a lot of problems and you need to resolve these. They are far more likely to be causing you problems than the format of links. For instance you have code like this

    <td width="30">
    <td align="right">

    Now that second <td> is obviously meant to be a </td> but the browser doesn't know that.

    Other items include a <div></div> in the middle of an unordered list where there should be an <li> tag.

    Your DOCTYPE is XHTML 1.0 Transitional but then you have attributes like onMouseOut which are invalid under XHTML because all attribute names are lowercase in XHTML.

    There is a script tag pair that looks like this <script ....stuff... /></script>

    You really need to run the site through the W3C validator ( ), tick the "Show source" option and correct all the coding errors. The W3C validator is fussy but it reports 94 errors and some of them are definitely going to cause you problems.

    Fix the HTML errors and CSS errors and then you will be in a position to evaluate the link problem.


    Author Closing Comment

    Not the exact solution, but gave me guidance to get to my soluton.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now