diff --git a/SpecialReplaceText.php b/SpecialReplaceText.php
index 5bbfe879..330c910c 100644
--- a/SpecialReplaceText.php
+++ b/SpecialReplaceText.php
@@ -397,7 +397,7 @@ class ReplaceText extends SpecialPage {
foreach ( $titles_for_move as $title ) {
$wgOut->addHTML(
Xml::check( 'move-' . $title->getArticleID(), true ) .
- $skin->makeLinkObj( $title, $title->getPrefixedText() ) . "
\n"
+ $skin->makeLinkObj( $title, htmlspecialchars( $title->getPrefixedText() ) ) . "
\n"
);
}
$wgOut->addHTML( '
' );