Jump to content

Topic on Extension talk:Realnames/Flow

Not working on body if username is not a link

2
Loic.tessier (talkcontribs)

Hello,


My topic is not relevant as a problem but as a tip :

In RealNames.body.php, it seems that a function is never call : "lookForBare"


I just add the line underlined below:

if ( $GLOBALS['wgRealnamesReplacements']['body'] === true ) {
                       // article html text
                       self::debug( __METHOD__, 'searching article body...' );
                       $out->mBodytext = self::lookForLinks( $out->getHTML() );
+                       $out->mBodytext = self::lookForBare ( $out->getHTML() );
               }

and then, username will be translate in RealName even if there is no link.

Bawolff (talkcontribs)

It seems like this would also cause usernames to be replaced in the edit box, which I think would be confusing. Especially if there are spaces. e.g. [[User:Foo | bar]] (note the extra space) would get replaced in the wikitext.

Reply to "Not working on body if username is not a link"