Notes are garbled at the bottom of roster page

Requests, feedback, and general discussion about WoWRoster
DO NOT post topics about WoWRoster AddOns here!

Notes are garbled at the bottom of roster page

Postby divine007 » Wed Nov 22, 2006 10:16 am

FOr some reason, the player notes and locations,etc are not in the correct place on my roster. Check it out for yourself, scroll to the bottm to see what I"m talking about. Funny thing is it only happens when using Firefox, fine in IE.

http://techsds.com/semantics
divine007
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Fri Jul 21, 2006 2:56 am

Notes are garbled at the bottom of roster page

Postby zanix » Wed Nov 22, 2006 1:24 pm

You have a rank called
Code: Select all
<-- Dumb ASS!


This is throwing off the html on the page thus making the browser thinking everything after the first instance of it is commented html

adjacent hyphens within comment
Cause:

This is due to too many hyphens "-" in the declaration of a comment. A comment is defined like this<!-- comment -->
Solution:

Remove the additional hyphens

BAD <!--- comment --->
GOOD <!-- comment -->

References:

W3C spec : http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.4


There is no easy fix for this as you are essentially inserting html comment code as the guild title
I would suggest removing one of the dashes, or the exclamation point
Code: Select all
<- Dumb ASS!
<-- Dumb ASS
Last edited by zanix on Wed Nov 22, 2006 1:26 pm, edited 1 time in total.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Notes are garbled at the bottom of roster page

Postby PleegWat » Wed Nov 22, 2006 6:37 pm

Or edit the membersList to do html_entities() (or what's that function named again) on the output fields.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Notes are garbled at the bottom of roster page

Postby zanix » Thu Nov 23, 2006 6:35 am

I think part of the reason this is happening, is on the line that outputs the change in the table headers for sorting
Code: Select all
if ( $roster_conf['sqldebug'] )
{
    echo 
"<!-- $order_field :: $last_value != $row[$order_field] -->\n";


There are also other places where this text will print or be set up for printing as well
Code: Select all
$divider_text '<div class="membersGroup">'.$ORDER_FIELD['divider_prefix'].$row[$order_field]."</div>\n"

Code: Select all
        if ( $current_col == $cols // last col
        
{
            echo 
"    <td class=\"$stripe_class_right\">$cell_value</td>\n";
        }
        else
        {
            echo 
"    <td class=\"$stripe_class\">$cell_value</td>\n";
        } 


Also, the note field goes through a bit of processing to clean up the text to prevent this type of thing from happening
Code: Select all
$prg_find = array('/"/','/&/','|\\>|','|\\<|',"/\\n/");
$prg_rep  = array('&quot;','&amp;','&gt;','&lt;','<br />');

$note preg_replace($prg_find$prg_rep$row['note']); 


Maybe we should make this parsing the default action for every field
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to General Support & Feedback

Who is online

Users browsing this forum: No registered users and 1 guest

cron