- $propValue = Html::element( 'span', array( 'class' => 'prop-value' ), $result->pp_value );
- $value = $this->msg( 'parentheses' )->rawParams( $propValue )->escaped();
- $ret .= " $value";
+ // Do not show very long or binary values on the special page
+ $valueLength = strlen( $result->pp_value );
+ $isBinary = strpos( $result->pp_value, "\0" ) !== false;
+ $isTooLong = $valueLength > 1024;
+
+ if ( $isBinary || $isTooLong ) {
+ $message = $this
+ ->msg( $isBinary ? 'pageswithprop-prophidden-binary' : 'pageswithprop-prophidden-long' )
+ ->params( $this->getLanguage()->formatSize( $valueLength ) );
+
+ $propValue = Html::element( 'span', array( 'class' => 'prop-value-hidden' ), $message->text() );
+ } else {
+ $propValue = Html::element( 'span', array( 'class' => 'prop-value' ), $result->pp_value );
+ }
+
+ $ret .= $this->msg( 'colon-separator' )->escaped() . $propValue;