API: paraminfo html strings shouldn't include unnecessary <p>s
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 5 Feb 2015 17:11:14 +0000 (12:11 -0500)
committerAmire80 <amir.aharoni@mail.huji.ac.il>
Mon, 2 Mar 2015 14:29:30 +0000 (14:29 +0000)
If the output is a single paragraph, there's not really a need for
explicit <p> tags around it.

Bug: T84995
Change-Id: I4406121fe0ec099c4a4ade849ef495edad90c2ad

includes/api/ApiParamInfo.php

index b74d528..f0a5daf 100644 (file)
@@ -156,7 +156,7 @@ class ApiParamInfo extends ApiBase {
                                if ( $joinLists ) {
                                        $ret = preg_replace( '!\s*</([oud]l)>\s*<\1>\s*!', "\n", $ret );
                                }
-                               $res[$key] = $ret;
+                               $res[$key] = Parser::stripOuterParagraph( $ret );
                                break;
 
                        case 'raw':