Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are these empty anchor tags coming from?

I'm getting empty tags in my page that aren't in the page source, but are visible upon inspecting the element via firebug. I've disabled javascript to see if that was injecting it, as well as disabling all add-ons. Here is an excerpt from the page source, free of random <a></a>:

...
<div class="middle-content">
     <div class="asu_set_fixed_width">
      <div id="navbar">
       <div id="navbar-inner" class="clear-block region region-navbar">
        <div class="region region-navbar">
         <div id="block-menu-primary-links" class="block block-menu first last region-odd odd region-count-1 count-1">
          <div class="content">
           <ul class="menu"><li class="leaf first active-trail"><a href="/index" title="Home" class="active">Home</a></li>
            <li class="leaf"><a href="/About_CUbiC" title="About CUbiC">About CUbiC</a></li>
...

and now examining with firebug with javascript disabled: firebug view with the annoying little buggers Same thing happens in Chrome as it does here in Firefox. Any thoughts on where these are coming from?

like image 617
cmikeb1 Avatar asked Dec 28 '22 18:12

cmikeb1


2 Answers

Validate your HTML.

http://validator.w3.org/check?uri=http%3A%2F%2Fcubic-dev.asu.edu%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

  • end tag for "a" omitted
  • start tag was here
  • etc..

The snippet of HTML in question is this (I added line breaks):

<a href="#">
    <img id="cubic-header-newsletter-img" src='..' alt='..'.>
<a>

There should be an </a> at the end there instead of <a>.

like image 107
thirtydot Avatar answered Dec 30 '22 07:12

thirtydot


Line 195:

        <a href="#"><img id="cubic-header-newsletter-img" src='/sites/all/themes/asuzen/images/newsletter_pic.png' alt='Newsletter imgae, click here for newsletter'.><a>

I think you mean:

... newsletter'></a>

and not:

.... newsletter'.><a>
like image 28
Drav Sloan Avatar answered Dec 30 '22 06:12

Drav Sloan