Skip to content

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

Open
@shadow1runner

Description

@shadow1runner

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions