You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notifications: small fixes found after reviewer (#10996)
* Notifications: small fixes found after reviewer
Use single `{}` since we are using `.format()` to format these strings.
* Handle missing `.format()` key
Avoid internal error and log the exception so we can figure it out how to solve
it. This happens when the `Notification` does not have _all_ the required `format_values`.
* Protection agasint XSS when rendering notifications
See #10922 (comment)
* Test for missing key in format values and XSS protection
* Update common/
* Lint
* Document we only support `str` and `int` for now in `format_values`
We don't support nested dictionaries in `format_values` or random objects.
Only `str` and `int`. That should be enough for now.
Skip all the values that are not `str` or `int` from the format values to render
the messages.
* Typo
Copy file name to clipboardExpand all lines: readthedocs/subscriptions/notifications.py
+1-1
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ def for_organizations(cls):
93
93
body=_(
94
94
textwrap.dedent(
95
95
"""
96
-
The organization "{instance.name}" is currently disabled. You need to <a href="{{ subscription_url }}">renew your subscription</a> to keep using Read the Docs
96
+
The organization "{instance.name}" is currently disabled. You need to <a href="{subscription_url}">renew your subscription</a> to keep using Read the Docs
0 commit comments