create-prisma-php-app 2.4.3 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -130,9 +130,23 @@ class TemplateCompiler
130
130
  );
131
131
  }
132
132
 
133
+ private static function escapeMustacheAngles(string $content): string
134
+ {
135
+ return preg_replace_callback(
136
+ '/\{\{[\s\S]*?\}\}/u',
137
+ fn($m) => str_replace(['<', '>'], ['&lt;', '&gt;'], $m[0]),
138
+ $content
139
+ );
140
+ }
141
+
133
142
  public static function convertToXml(string $templateContent): DOMDocument
134
143
  {
135
- $templateContent = self::escapeAttributeAngles(self::escapeAmpersands($templateContent));
144
+ $templateContent = self::escapeMustacheAngles(
145
+ self::escapeAttributeAngles(
146
+ self::escapeAmpersands($templateContent)
147
+ )
148
+ );
149
+
136
150
  $dom = new DOMDocument();
137
151
  libxml_use_internal_errors(true);
138
152
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",