Support Malformed <a> tag when displaying avatar

teh1337 Feb 22, 2013

  1. teh1337

    teh1337 我是精英黑客 XPG Developer
    185/188

    Joined:
    Jan 4, 2013
    Messages:
    7
    Likes Received:
    21
    Trophy Points:
    0
    Gender:
    Male
    Location:
    Cosmos
    Console:
    Xbox
    Look at my avatar?
    See something strange, well if you do it should look something like this:
    [​IMG]

    Upon further exploration, my suspicions of a malformed tag were confirmed:

    <li class="avatar">
    <a itemprop="url" href="http://www.xpgamesaves.com/user/372178-teh1337/" title="View Profile: <span style=" color:#ff6600;="" text-shadow:="" 1px="" 3px="" 4px="" orange"="">teh1337" class='ipsUserPhotoLink'>

    <img itemprop="image" src="http://www.xpgamesaves.com/uploads/profile/photo-thumb-372178.png?_r=1361493931" class="ipsUserPhoto ipsUserPhoto_large">
    </a></li>


    As you can see inside the <a> markup construct, the tag:



    <span style=" color:#ff6600;="" text-shadow:="" 1px="" 3px="" 4px="" orange"="">

    has been inserted between:



    <a itemprop="url" href="http://www.xpgamesaves.com/user/372178-teh1337/" title="View Profile:
    and:


    teh1337" class='ipsUserPhotoLink'>

    If generated properly, the avatar's innerHTML should look like this:

    <li class="avatar">
    <a itemprop="url" href="http://www.xpgamesaves.com/user/372178-teh1337/" title="View Profile: teh1337" class='ipsUserPhotoLink'>
    <span style="color:#ff6600; text-shadow:1px 3px 4px orange">
    <img itemprop="image" src="http://www.xpgamesaves.com/uploads/profile/photo-thumb-372178.png?_r=1361493931" class="ipsUserPhoto ipsUserPhoto_large">
    </span>
    </a></li>


    Which will look like this:
    [​IMG]

    - Carter
     
  2. XPGProgrammer

    XPGProgrammer Newbie
    0/47

    Joined:
    Jan 2, 2013
    Messages:
    802
    Likes Received:
    214
    Trophy Points:
    0
    Gender:
    Male
    Location:
    Canada
    Console:
    Xbox
    I also noticed that a while ago but I didn't know what to do to fix it. I'm glad to see that you know how!!!!!! :D
     
  3. Wallsch

    Wallsch Gold Member Gold Subscriber Lifetime Gold
    185/188

    Joined:
    Oct 3, 2011
    Messages:
    4,651
    Likes Received:
    527
    Trophy Points:
    185
    Gender:
    Male
    Location:
    Wausau, Wi
    Console:
    Computer
    FYI it's in PHP not HTML. HTML fixes it for the page PHP will fix it for all pages. It's a glitch since upgrading versions of IPB. Not sure if it will be fixed or if the person has to reset their Avatar.
     
  4. teh1337

    teh1337 我是精英黑客 XPG Developer
    0/47

    Joined:
    Jan 4, 2013
    Messages:
    7
    Likes Received:
    21
    Trophy Points:
    0
    Gender:
    Male
    Location:
    Cosmos
    Console:
    Xbox
    lol... I know this, but what the problem is is most likely a templating error, not a IPB backbone one. The template has content identifiers which the php backend parses and fills in with the correct information, for instance adding <h1>{page-title}</h1> would replace {page-title} with the appropriate page title. I am guessing someone messed up the template and had <a ... {avatar-data} /> by mistake.

    And yes its an html error, the php is not problematic, the php script is parsing a template and is therefore operating 100% perfectly, once again its a templating error.
     
  5. Bu

    Bullet Guest

    Thanks for bringing this up, i will look into it further.

    EDIT: There you go, its an outdated hook that was causing the template to break.

    I will look at fixing the hook later after work.
     
  6. Bu

    Bullet Guest

    Ok fixed error now, enjoy.
     
  7. XPGProgrammer

    XPGProgrammer Newbie
    0/47

    Joined:
    Jan 2, 2013
    Messages:
    802
    Likes Received:
    214
    Trophy Points:
    0
    Gender:
    Male
    Location:
    Canada
    Console:
    Xbox
    Thanks for the fix, Bullet.
     

Share This Page

Close