Skip to content

Commit 1f79776

Browse files
committed
Pull HTML tags out before converting markdown
1 parent 9db65c6 commit 1f79776

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Helpers/Helper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static function parseEscapedMarkedown($str = null)
9595
$Parsedown->setSafeMode(true);
9696

9797
if ($str) {
98-
return $Parsedown->text($str);
98+
return $Parsedown->text(strip_tags($str));
9999
}
100100
}
101101

@@ -105,7 +105,7 @@ public static function parseEscapedMarkedownInline($str = null)
105105
$Parsedown->setSafeMode(true);
106106

107107
if ($str) {
108-
return $Parsedown->line($str);
108+
return $Parsedown->line(strip_tags($str));
109109
}
110110
}
111111

0 commit comments

Comments
 (0)