+ if ( $options['unwrap'] !== false ) {
+ $start = Html::openElement( 'div', [
+ 'class' => 'mw-parser-output'
+ ] );
+ $startLen = strlen( $start );
+ $end = Html::closeElement( 'div' );
+ $endLen = strlen( $end );
+
+ if ( substr( $text, 0, $startLen ) === $start && substr( $text, -$endLen ) === $end ) {
+ $text = substr( $text, $startLen, -$endLen );
+ }
+ }
+