Skip to content

Markup does not fail on missing placeholder #225

@mart-e

Description

@mart-e

In the scenario of a missing single placeholder, the mod operator did
not fail as it does when having multiple placeholder

How to reproduce:

>>> Markup("foo") % 42
Markup("foo")
>>> Markup("foo") % (42, 43)
TypeError: not all arguments converted during string formatting
>>> Markup("foo") % (42,)
TypeError: not all arguments converted during string formatting

Expected behavior:
Fail on the three code snippets, as when using native strings.

Environment:

  • Python version: 3.9.5
  • MarkupSafe version: 1.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions