SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,287
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)

    Help! Tags getting added by something!

    I'm freaking out. I have some static HTML pages I made a while back, and last 20 nov they were fine. I go to look at one today and it's screwed up. The headers all look like links!

    I look in the source code, and it looks fine.
    Code:
            <p id="keurmerk"><a href="http://www.keurmerk.info/winkel_detail.php?winkel_id=1485"><img src="img/logo-WSK-(landscape)_kl.png" width="136" height="33" alt="Webshop Keurmerk" /><a/></p>
    	<p id="betaal">U kunt met iDeal betalen<span></span></p>
            <p id="versturen">Wij versturen met TNT Post<span></span></p>
          </div>
          <div id="main">
            <h1><span class="dobber">Dobber<span></span></span> is clothes for unhappy-looking kids in bleak industrial settings.  Leuk voor de kinderen, hé?</h1>
    
            <h2>Buy trendy Dobber kleding here:</h2>
    	<div id="kledingkast">
              <div>
    	    <a href="index.php?p=meisjes"><img src="images/meiden.jpg" width="166" height="150" alt="Meisjeskleding: Geisha, Lee" /></a>
    For the lawlz I decided to View Generated Source, and get this
    Code:
            <p id="keurmerk"><a href="http://www.keurmerk.info/winkel_detail.php?winkel_id=1485"><img src="img/logo-WSK-%28landscape%29_kl.png" alt="Webshop Keurmerk" width="136" height="33"></a><a></a></p>
    <a>	</a><p id="betaal"><a>U kunt met iDeal betalen<span></span></a></p>
    <a>        </a><p id="versturen"><a>Wij versturen met TNT Post<span></span></a></p>
    <a>      </a></div>
    <a>      </a><div id="main">
    <a>        </a><h1><span class="dobber"><a>Dobber<span></span></a></span><a> is clothes for unhappy-looking kids in bleak industrial settings.  Leuk voor de kinderen, hé?</a></h1>
    
    <a>        </a><h2><a>Buy trendy Dobber kleding here:</a></h2>
    <a>	</a><div id="kledingkast">
    <a>          </a><div>
    <a>	    </a><a href="index.php?p=meisjes"><img src="images/meiden.jpg" alt="Meisjeskleding: Geisha, Lee" width="166" height="150"></a>
    LOLWUT? Where are these buggers coming from?
    So I reinstall Firebug to see if there's more info there.

    It shows more in these anchor tags:
    <a _moz-rs-heading=""> is clothes for unhappy-looking kids in bleak industrial settings. Leuk voor de kinderen, hé?</a>

    _moz-rs-heading??? I open VB and check in other browsers.

    Opera and IE7 show no change.

    Saffy and Chrome show the headers looking like links, but not in the same way FF does. K-Meleon (FF2) is showing them as well.

    There are no scripts on these pages and I haven't turned anything weird on in Firefox (and even if I had, the other browsers are generating it too). I haven't figured out how to view a generated source in other browsers.

    What the heck is going on?

    A quick check of my other static pages on the same server don't seem to have this problem. It seems to only be on all my pages in one folder.
    Link any suggestions?? What stomme thing have I done now?

  2. #2
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,287
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Arg. Figured out the stomme thing I did. There's a typo:
    <a/> in the keurmerk link. Since the other pages don't have the typo they didn't get the error.

    Little did I know that this caused some browsers (but not others) to generate a heap of extra markup for some reason (trying to fix the error??). When I had searched earlier on teh googles for the _moz-rs-heading="" I sure found a lot of pages simply had it in the code and the googles somehow grabbed it (scroll past the Drupal questions).
    So it seems to be sitting in lots of people's codes online! Creepy.

    I'll leave the mistake in the link above for a bit.

    To make up for filling the forum with yet another silly thread (usually I can just get to the answer (myself) by writing the thread, so no it's not useless exercise) and wasting time, I'll post a Story of Truth in repentance.
    Last edited by Stomme poes; Dec 4, 2009 at 05:13. Reason: rephrased answer

  3. #3
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mmmm, HTML error handling.

    I guess a validator would point out where the problem was.

    Edit:

    http://validator.nu/ says "Error: An a start tag seen with already an active a element."
    Simon Pieters

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,338
    Mentioned
    465 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    I'll post a Story of Truth in repentance.
    You are forgiven. Made my day.

  5. #5
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,287
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    I guess a validator would point out where the problem was.
    O Simon, the stomme thing I did wasn't the typo itself, but that I figured all my pages were the same (usually they are... these are all dummy pages mostly just existing to show the header image plus extra stuff I play with) so I'd validated the other pages earlier lawlz and silly I assumed that covered the weird page. Since I did have my coffee this morning I can't seem to find my other excuses hiding onder the bed away from me...

    Maybe I should make them all XHTML so I get a proper yeller scream of deth instead of weird "Mozilla's gonna fix yer crappy markup sos its got a perdy-er mouth lulz" stuff, to defeat mah laziness. It's like a tapeworm in mah browser : (

    Seriously I thought error handling was like me pretending to read Chinese (when you don't understand it, just make stuff up and tell everyone that's what it says). I didn't know anything about added tags.

  6. #6
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Reading your HTML, your DOM-tree of the erroneous code is something like what I've written below. Unless the build-in error handler would end inline-level tags with required end tags when encountering a block-level end tag, it's no wonder the browser got confused

    Code html4strict:
    <p>
     <a>
      <img>
     </a>
     <a>
      </p>
      <p>
       <span>
       </span>
      </p>
      <p>
       <span>
       <span>
      </p>
      </div>
      <div>
       <h1>
        <span>
         <span>
         </span>
        </span>
       </h1>
       <h2>
       <div>
        <div>
     </a>
     <a>
      <img>
     </a>
    </p>
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •