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

entry._get_string_field fails if key contains a double quote due to missing XPath escaping #254

Open
shadow1runner opened this issue Mar 23, 2021 · 1 comment

Comments

@shadow1runner
Copy link

shadow1runner commented Mar 23, 2021

This is closely related to the subject discussed in #123 and the corresponding PR #204 and appeared in downstream jampe/kp2bw#10.

The issue in entry.py are threefold:

which all boil down do the fact, that using the latter as an example, the given key is not properly escaped:

prop = self._xpath('String/Key[text()="{}"]/..'.format(key), first=True)

Now @Evidlo already mentioned the possibility of using a simple escape method for this purpose; however, I assume there will be more of these xpath related issues which makes me wondering whether you guys think that it's time that #204 gets merged? As far as I see it doesn't fix the issues outlined here, but it lays the required foundation to do so

Thanks

@smithfred
Copy link

Can Evidlo's referenced function be used for now while other fixes are worked on, since this is a crashing bug for consuming applications if the user tries to use quotation marks in various places, and the bug's been around for at least 2.5 years now per the git blame of the above.

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

No branches or pull requests

2 participants