Skip to content

Commit

Permalink
add sanitize parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Mar 18, 2024
1 parent eff23a6 commit fd0021b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions mercury/widgets/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def frontend_format(output):
"url_key": output.get("url_key", ""),
"disabled": output.get("disabled", False),
"hidden": output.get("hidden", False),
"sanitize": output.get("sanitize", True),
}
elif widget_type == "File":
return {
Expand Down
5 changes: 5 additions & 0 deletions mercury/widgets/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ class Text:
hidden : bool, default False
If set to True, the widget will not be visible in the UI. Defaults to False.
sanitize : bool, default True
If set to True, the string value will be sanitized, for example characters like
quotes or parentheses will be removed.
Attributes
----------
value : str
Expand Down

0 comments on commit fd0021b

Please sign in to comment.