markers.
Not sure the preg_match() is actually needed. Or it may be
appropriate to use MARKER_SUFFIX for the match.
The error message may also need to be rewritten to be more
user-friendly, but I'm pretty sure *an* error message is friendlier
than UNIQ garbage. And making them visible error messages makes them
easier to be found.
if ( isset( $this->data[$this->tempType][$m[1]] ) ) {
return $this->data[$this->tempType][$m[1]];
} else {
+ if( preg_match( $this->regex, $m[0] ) ) {
+ return "<strong class='error'>".htmlspecialchars( wfMsg( "stripstate-error" ) )."</strong>";
+ }
return $m[0];
}
}
# Core parser functions
'unknown_extension_tag' => 'Unknown extension tag "$1"',
'duplicate-defaultsort' => '\'\'\'Warning:\'\'\' Default sort key "$2" overrides earlier default sort key "$1".',
+'stripstate-error' => 'unstripCallback called with strip markers still intact. Please fix your markup.',
# Special:Version
'version' => 'Version',