Skip to content

Commit

Permalink
Properly escape parameters in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
jimporter committed Jul 27, 2024
1 parent 90cf131 commit 91cf5ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/unit/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def _test_deploy(self, expected_message=None,
rev = git_utils.get_latest_commit('master', short=True)
expected_message = (
r'^Deployed {} to {}( in .*)? with MkDocs \S+ and mike \S+$'
.format(rev, expected_versions[0].version)
.format(re.escape(rev),
re.escape(str(expected_versions[0].version)))
)

if os.path.exists(self.cfg['site_dir']):
Expand Down

0 comments on commit 91cf5ee

Please sign in to comment.