We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1667454 commit e489b4aCopy full SHA for e489b4a
reflex_ui/blocks/telemetry/unify.py
@@ -1,7 +1,5 @@
1
"""Unify analytics tracking integration for Reflex applications."""
2
3
-import json
4
-
5
import reflex as rx
6
7
PIXEL_SCRIPT_UNIFY: str = """
@@ -29,8 +27,10 @@ def unify_identify_js(
29
27
Returns:
30
28
str: JavaScript code to identify the user in Unify
31
"""
+ import json
+
32
# Escape the email to prevent XSS
33
- escaped_email = email.replace("\\", "\\\\").replace("'", "\\'").replace('"', '\\"')
+ escaped_email = email.replace("'", "\\'").replace('"', '\\"').replace("\\", "\\\\")
34
35
# Build the person object - email is always required
36
person_obj: dict[str, str | int | bool] = {"email": email}
0 commit comments