From 8a7dfb81647a6e14b07030558adfd991d5cbc1cf Mon Sep 17 00:00:00 2001 From: Robin Pepermans Date: Sat, 27 Aug 2011 21:46:39 +0000 Subject: [PATCH] Properly mark the language and direction of the readonly textarea --- includes/OutputPage.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 504db295d6..e4336a1d3a 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2087,12 +2087,15 @@ class OutputPage extends ContextSource { if( is_string( $source ) ) { $this->addWikiMsg( 'viewsourcetext' ); + $pageLang = $this->getTitle()->getPageLanguage(); $params = array( 'id' => 'wpTextbox1', 'name' => 'wpTextbox1', 'cols' => $this->getUser()->getOption( 'cols' ), 'rows' => $this->getUser()->getOption( 'rows' ), - 'readonly' => 'readonly' + 'readonly' => 'readonly', + 'lang' => $pageLang->getCode(), + 'dir' => $pageLang->getDir(), ); $this->addHTML( Html::element( 'textarea', $params, $source ) ); -- 2.20.1