@@ -592,8 +592,7 @@ private function dataToHtml ($r, $options, $caption = '') {
592
592
$ id = ( 0 === $ this ->invocations )
593
593
? 'igsv- ' . $ this ->getDocId ( $ options ['key ' ] )
594
594
: "igsv- {$ this ->invocations }- " . $ this ->getDocId ( $ options ['key ' ] );
595
- $ id = esc_attr ( $ id );
596
- $ html = '<table id="$id" ' ;
595
+ $ html = '<table id=" ' . esc_attr ( $ id ) . '" ' ;
597
596
// Prepend a space character onto the 'class' value, if one exists.
598
597
if ( ! empty ( $ options ['class ' ] ) ) {
599
598
$ options ['class ' ] = " {$ options ['class ' ]}" ;
@@ -614,7 +613,7 @@ private function dataToHtml ($r, $options, $caption = '') {
614
613
615
614
$ html .= "<thead> \n" ;
616
615
foreach ( $ thead as $ v ) {
617
- $ html .= "<tr id= \"$ id-row- $ ir\ " class= \ "row- $ ir " . $ this ->evenOrOdd ( $ ir ) . "\"> " ;
616
+ $ html .= "<tr id= \"" . esc_attr ( $ id ) . ' -row-$ir" class="row-$ir ' . $ this ->evenOrOdd ( $ ir ) . "\"> " ;
618
617
$ ir ++;
619
618
$ ic = 1 ; // reset column counting
620
619
foreach ( $ v as $ th ) {
@@ -629,7 +628,7 @@ private function dataToHtml ($r, $options, $caption = '') {
629
628
if ( $ tfoot ) {
630
629
$ html .= "<tfoot> \n" ;
631
630
foreach ( $ tfoot as $ v ) {
632
- $ html .= "<tr id= \"$ id-row- $ ir \" class= \"row- $ ir " . $ this ->evenOrOdd ( $ ir ) . "\"> " ;
631
+ $ html .= "<tr id= \"" . esc_attr ( $ id ) . " -row- $ ir \" class= \"row- $ ir " . $ this ->evenOrOdd ( $ ir ) . "\"> " ;
633
632
$ ir ++;
634
633
$ ic = 1 ; // reset column counting
635
634
foreach ( $ v as $ td ) {
@@ -645,7 +644,7 @@ private function dataToHtml ($r, $options, $caption = '') {
645
644
646
645
$ html .= "<tbody> \n" ;
647
646
foreach ( $ tbody as $ v ) {
648
- $ html .= "<tr id= \"$ id-row- $ ir \" class= \"row- $ ir " . $ this ->evenOrOdd ( $ ir ) . "\"> " ;
647
+ $ html .= "<tr id= \"" . esc_attr ( $ id ) . " -row- $ ir \" class= \"row- $ ir " . $ this ->evenOrOdd ( $ ir ) . "\"> " ;
649
648
$ ir ++;
650
649
$ ic = 1 ; // reset column counting
651
650
foreach ( $ v as $ td ) {
0 commit comments