Last modified: 2012-10-24 17:36:39 UTC
Created attachment 4645 [details] line break before message Blockedtext Message Blockedtext cannot start with == heading ==, it is rendered as "==". I guess adding line break before message is inserted can fix this.
Proposed patch is insufficient; these permission errors are formatted in such a way that they *need to* be treated as single lines. If there's only one, it's wrapped in a <div>; multiples are wrapped in <li>s in a <ul> bullet list. If it were correct to allow block formatting (such as headers), then the whole function needs to be ripped out and totally rewritten.
That's probably a good idea then :D - since the few major wiki's I've checked all have headings, div's, tables and what not in MediaWiki:Blockedtext. -- Krinkle
Though the cause of the rendering not happening might not be the cause of the (absence of a) linebreak, since on those few major wiki's it is just fine. See also https://bugzilla.wikimedia.org/show_bug.cgi?id=22806 where I have an issue that might be related.
The newline from the patch was added in r50976. Is that a possible fix?
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Li-sung, thanks for the patch. Do you have time and interest in updating it and revising it in accordance with the suggestions you've received in comments?
The wanted newline is in the code now. Considering this issue closed. OutputPage.php: 2193 if ( count( $errors ) > 1 ) { 2194 $text .= '<ul class="permissions-errors">' . "\n"; 2195 2196 foreach( $errors as $error ) { 2197 $text .= '<li>'; 2198 $text .= call_user_func_array( array( $this, 'msg' ), $error )->plain(); 2199 $text .= "</li>\n"; 2200 } 2201 $text .= '</ul>'; 2202 } else { 2203 $text .= "<div class=\"permissions-errors\">\n" . 2204 call_user_func_array( array( $this, 'msg' ), reset( $errors ) )->plain() . 2205 "\n</div>"; 2206 }