Skip to content

Escaping "\v" as a vertical tabulation where it shouldn't #565

@theo-frontier-sidel

Description

@theo-frontier-sidel

Here's the steps to reproduce:

  1. In a .env file, write:
VAR1 = "abs\path\vasdf"
  1. In a python module, write:
import dotenv

dotenv_path = r"path\to\.env"
print(dotenv.dotenv_values(dotenv_path))

You'll get OrderedDict([('VAR1', 'abs\x0basdf\\path')]), where it should be OrderedDict([('VAR1', 'abs\\vasdf\\path')]).

I searched for the "x0b" unicode and it's a vertical tab, that can be obtained with "\x0b" or "\v" in python.

I'm using windows 11 and the last version of python-dotenv (1.1.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions