Hi, while using the "link text" parameter of #formredlink I noticed that this parameter gets ignored when the page specified in the "target" parameter exists.
The "shortcut" in the code for this case returns Linker::link( $targetTitle ) i.e. without specifying a link text which in turn causes Linker::link to use $targetTitle as link text. Find attached a small patch that solved the problem for me. I am not sure if the htmlspecialchars() call is really necessary but I guess it doesn't hurt, does it? Greetings Hermann
diff --git a/includes/SF_Utils.php b/includes/SF_Utils.php index 9bf529d..af4cb39 100644 --- a/includes/SF_Utils.php +++ b/includes/SF_Utils.php @@ -1070,7 +1070,7 @@ END; } if ( $parserFunctionName == 'formredlink' && $targetPageExists ) { - return Linker::link( $targetTitle ); + return Linker::link( $targetTitle, htmlspecialchars( $inLinkStr ) ); } if ( $parserFunctionName == 'queryformlink' ) {
------------------------------------------------------------------------------
_______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel