diff --git a/includes/WikiCategoryTagCloud.php b/includes/WikiCategoryTagCloud.php
index effc825..d42f52a 100644
--- a/includes/WikiCategoryTagCloud.php
+++ b/includes/WikiCategoryTagCloud.php
@@ -192,9 +192,15 @@ class WikiCategoryTagCloud {
 				$style .= ';';
 			}
 			$style .= "font-size: {$textSize}%;";
-			$currentRow = '<a class="' . implode( ' ', $linkClasses ) .
-				"\" style=\"{$style}\" href=\"" . $title->getLocalURL() . '">' .
-				$title->getText() . '</a>&#160; ';
+			$currentRow = Html::element(
+				'a',
+				[
+					'class' => implode( ' ', $linkClasses ),
+					'style' => $style,
+					'href' => $title->getLocalURL()
+				],
+				$title->getText()
+			) . '&#160; ';
 			$htmlOut = $htmlOut . $currentRow;
 		}
 		$htmlOut = $htmlOut . '</div>';
