Last modified: 2007-11-30 18:38:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12150 - Parser::insertStripItem not generating unique markers per call
Parser::insertStripItem not generating unique markers per call
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
  Show dependency treegraph
Reported: 2007-11-29 21:36 UTC by Jared Williams
Modified: 2007-11-30 18:38 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Jared Williams 2007-11-29 21:36:11 UTC
Browsing r27906 of Parser.php and noticed this bit of code..  (line 586)

 * Add an item to the strip state
 * Returns the unique tag which must be inserted into the stripped text
 * The tag will be replaced with the original text in unstrip()
 * @private
function insertStripItem( $text ) {
	static $n = 0;
	$rnd = "{$this->mUniqPrefix}-item-$n-{$this->mMarkerSuffix}";
	$this->mStripState->general->setPair( $rnd, $text );
	return $rnd;

It appears that $n should be incremented each time its called.
Comment 1 Roan Kattouw 2007-11-29 21:56:27 UTC
I think so. Can someone familiar with the parser comment on this?
Comment 2 Tim Starling 2007-11-30 18:38:08 UTC
Fixed in r27988.

Note You need to log in before you can comment on or make changes to this bug.