diff --git a/ChangeLog b/ChangeLog index 9a2360a7b..dbcc2adce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog 3.4.5.0 (not yet released) - bug #3375325 [interface] Page list in navigation frame looks odd - bug #3313235 [interface] Error div misplaced +- bug #3374802 [interface] Comment on a column breaks inline editing 3.4.4.0 (not yet released) - bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes diff --git a/js/sql.js b/js/sql.js index b185b6952..dbba44136 100644 --- a/js/sql.js +++ b/js/sql.js @@ -33,10 +33,10 @@ function PMA_urlencode(str) { function getFieldName($this_field, disp_mode) { if(disp_mode == 'vertical') { - var field_name = $this_field.siblings('th').find('a').text(); + var $field = $this_field.siblings('th').find('a').clone(); // happens when just one row (headings contain no a) - if ("" == field_name) { - field_name = $this_field.siblings('th').text(); + if ($field.length == 0) { + $field = $this_field.siblings('th').clone(); } } else { @@ -44,14 +44,14 @@ function getFieldName($this_field, disp_mode) { // ltr or rtl direction does not impact how the DOM was generated // // 5 columns to account for the checkbox, edit, appended inline edit, copy and delete anchors but index is zero-based so substract 4 - var field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+') a').text(); + var $field = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+') a').clone(); // happens when just one row (headings contain no a) - if ("" == field_name) { - field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+')').text(); + if ($field.length == 0) { + $field = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+')').clone(); } } - - field_name = $.trim(field_name); + $field.children().remove(); + var field_name = $.trim($field.text()); return field_name; }