Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -3130,8 +3130,16 @@ |
3131 | 3131 | |
3132 | 3132 | if ( is_string( $text ) && !$this->incrementIncludeSize( 'post-expand', strlen( $text ) ) ) { |
3133 | 3133 | # Error, oversize inclusion |
3134 | | - $text = "[[$originalTitle]]" . |
3135 | | - $this->insertStripItem( '<!-- WARNING: template omitted, post-expand include size too large -->' ); |
| 3134 | + if ( $titleText !== false ) { |
| 3135 | + # Make a working, properly escaped link if possible (bug 23588) |
| 3136 | + $text = "[[:$titleText]]"; |
| 3137 | + } else { |
| 3138 | + # This will probably not be a working link, but at least it may |
| 3139 | + # provide some hint of where the problem is |
| 3140 | + preg_replace( '/^:/', '', $originalTitle ); |
| 3141 | + $text = "[[:$originalTitle]]"; |
| 3142 | + } |
| 3143 | + $text .= $this->insertStripItem( '<!-- WARNING: template omitted, post-expand include size too large -->' ); |
3136 | 3144 | $this->limitationWarn( 'post-expand-template-inclusion' ); |
3137 | 3145 | } |
3138 | 3146 | |