From e2502bffc9449e47551743b37cd2ef53b38a1f22 Mon Sep 17 00:00:00 2001 From: Cindy Cicalese Date: Tue, 1 May 2018 21:25:36 +0000 Subject: [PATCH] Added HtmlArmor. Bug:T191546 Change-Id: I16de28f829953eb8d1e028e600ca53f583e64e67 (cherry picked from commit 1f292fb405fc08817ff0954aad541b8243b23af3) --- src/ReplaceTextUtils.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ReplaceTextUtils.php b/src/ReplaceTextUtils.php index c603cdca..3adbe5be 100644 --- a/src/ReplaceTextUtils.php +++ b/src/ReplaceTextUtils.php @@ -1,6 +1,6 @@ getLinkRenderer(); + if ( class_exists( 'HtmlArmor' ) && !is_null( $text ) ) { + $text = new HtmlArmor( $text ); + } return $linkRenderer->makeLink( $title, $text ); }; return Linker::link( $title, $text );