Skip to content

Commit

Permalink
HtmlString: do not encode quotes
Browse files Browse the repository at this point in the history
It would replace apostrophes with `'` breaking the content equality assertion in the next commit.
  • Loading branch information
jtojnar committed Feb 15, 2023
1 parent 453510d commit 6a38b51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/HtmlString.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static function fromRaw(string $content): self {
* Creates a new HtmlString from a plain text string.
*/
public static function fromPlainText(string $content): self {
return new self(htmlspecialchars($content));
return new self(htmlspecialchars($content, ENT_NOQUOTES));
}

/**
Expand Down

0 comments on commit 6a38b51

Please sign in to comment.