#3888 title attribute displayed before other html text on SQL query page

Latest_Git
fixed
None
1
2013-06-11
2013-04-23
No

So, here is the problem

title attribute misplaced

To reproduce this bug
1) Browse any table
2) Open the SQL query tab from there

The title="" is displayed as many times as there are columns in the table.

Here is what the code looks like in file libraries/sql_query_form.lib.php from line 285

foreach ($fields_list as $field) {
        $html .= '<option value="'
            . PMA_Util::backquote(htmlspecialchars($field['Field'])) . '"';
        if (isset($field['Field'])
            && strlen($field['Field'])
            && isset($field['Comment'])
        ) {
            $echo ' title="' . htmlspecialchars($field['Comment']) . '"';
        }
        $html .= '>' . htmlspecialchars($field['Field']) . '</option>' . "\n";
    }

Notice that the line

$echo ' title="' . htmlspecialchars($field['Comment']) . '"';

displays the title attribute for the option element before any other html is displayed

What the code should look like

$html .= ' title="' . htmlspecialchars($field['Comment']) . '"';

to ensure that the title attribute is displayed properly

Just a minor fix.

Discussion

  • Michal Čihař

    Michal Čihař - 2013-04-23
    • status: open --> closed-fixed
    • assigned_to: Marc Delisle
    • Group: 4.0.0 --> Latest_Git
     
  • Michal Čihař

    Michal Čihař - 2013-04-23

    Already fixed by Marc in ee09f98f73f887f8ae9540c253686a77e5e0bc69

     
    • Abhishek Kandoi

      Abhishek Kandoi - 2013-04-23

      Yeah. Sorry I was using an older version when I found this bug so didn't notice the fix when I fetched the latest version.

       
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks