Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_xpath function throws exception when title or username contains quote #123

Open
Flowelfox opened this issue Dec 12, 2018 · 0 comments · May be fixed by #204
Open

_xpath function throws exception when title or username contains quote #123

Flowelfox opened this issue Dec 12, 2018 · 0 comments · May be fixed by #204

Comments

@Flowelfox
Copy link

When i use function

kdb.add_entry(parent_kdb_group, entry.title, entry.username, entry.password, entry.url, entry.notes)

and entry.title contains quote, in PyKeePass._xpath function xpath_str formed like this:

xpath_str = './Entry/String/Key[text()="Title"]/../Value[text()="test "inner""]/../../String/Key[text()="UserName"]/../Value[text()="some username"]/../..'

when tree.xpath() is runned it thows exception XpathEvalError: Invalid predicate
It happens because syntaxis like

Value[text()="test "inner""]

can't be used in xpath.

Can you please fix this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant