Skip to content

Commit

Permalink
allow quotes in todo's
Browse files Browse the repository at this point in the history
  • Loading branch information
gwleuverink committed Aug 15, 2024
1 parent 4d3cfa4 commit 9fd011e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CommentsPrecompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected static function compileTodosMark($view, $openComment, $closeComment)
// Process each match
foreach ($matches as $match) {
$fullComment = $match[0]; // Full comment including {{-- and --}}
$commentBody = self::trimColons($match[1]); // Comment body without {{-- TODO: and --}}
$commentBody = htmlspecialchars(self::trimColons($match[1])); // Comment body without {{-- TODO: and --}}

$magicTodoComponent = <<< BLADE
<x-magic-todo::highlight todo="{$commentBody}" />
Expand Down Expand Up @@ -60,7 +60,7 @@ protected static function compileWrappedBladeTodos($view, $openComment, $closeCo
foreach ($matches as $match) {

$todoBlock = trim($match[1]); // Everything between TODO & ENDTODO including the wrapping comments
$todoComment = self::trimColons($match[2]); // Just the text inside the TODO comment
$todoComment = htmlspecialchars(self::trimColons($match[2])); // Just the text inside the TODO comment
$content = trim($match[3]); // The content between TODO and ENDTODO

$magicTodoComponent = <<< BLADE
Expand Down

0 comments on commit 9fd011e

Please sign in to comment.