- $row .= '<td dir="' . $wgContLang->getDir() . '">' .
- Linker::formatComment( $description, $this->title ) . '</td>';
+ $contLang = MediaWikiServices::getInstance()->getContentLanguage();
+ $row .= Html::rawElement(
+ 'td',
+ [ 'dir' => $contLang->getDir() ],
+ Linker::formatComment( $description, $this->title )
+ );