Skip to content

Commit

Permalink
feat: escape string terms
Browse files Browse the repository at this point in the history
  • Loading branch information
mecha committed Feb 13, 2024
1 parent 29986fb commit b8d592d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Expression/Term.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ protected function toBaseString(): string
case self::NUMBER:
return (string) $this->value;
case self::STRING:
return "'$this->value'";
$esc = addslashes((string) $this->value);
return "'$esc'";
case self::BOOLEAN:
return $this->value ? 'TRUE' : 'FALSE';
case self::LIST:
Expand Down

0 comments on commit b8d592d

Please sign in to comment.