Pastakhov has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378663 )

Change subject: Trim the exception messages
......................................................................

Trim the exception messages

Change-Id: I52a98ec08278f8d7da713b958eef2a30ff8f93dd
---
M includes/PhpTagsException.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTags 
refs/changes/63/378663/1

diff --git a/includes/PhpTagsException.php b/includes/PhpTagsException.php
index e9e549d..1c62795 100644
--- a/includes/PhpTagsException.php
+++ b/includes/PhpTagsException.php
@@ -234,8 +234,8 @@
                                break;
                }
 
-               //return "$message in $place on line $line\n";
-               return \Html::element( 'span', array('class'=>'error'), 
"PhpTags $messageType:  $message in $place on line $line" ) . '<br />';
+               $messageTrimed = trim( preg_replace( '/\s+/', ' ', 
preg_replace( '/<br\s+\/>|<br>/', ' ', $message ) ) );
+               return \Html::element( 'span', array('class'=>'error'), 
"PhpTags $messageType:  $messageTrimed in $place on line $line" ) . '<br />';
 
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/378663
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52a98ec08278f8d7da713b958eef2a30ff8f93dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTags
Gerrit-Branch: master
Gerrit-Owner: Pastakhov <pastak...@yandex.ru>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to