-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Closed
Copy link
Labels
previewRelated to preview mode featuresRelated to preview mode featuresruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
There are a few cases where it does not really make sense to get the warning, since it's pretty clearly intentional to avoid escaping, but adding noqa comments in every place where it's used would be very noisy/verbose:
Markup(render_template(...))Markup(_('Have a look at <strong>this</strong> translated string!'))msg = _('Have a look at <strong>this</strong>!'); Markup(msg)
So ideally I'd like to have a setting where I can add function names (ideally as import strings, but just names would also be OK most of the time) to be considered safe to have their return value passed to Markdown - either directly or via a variable assignment.
In the above case, I'd expect all 3 warnings to disappear by whitelisting render_template and _.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
previewRelated to preview mode featuresRelated to preview mode featuresruleImplementing or modifying a lint ruleImplementing or modifying a lint rule