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

XML attribute values are not consistently unescaped (e.g. for <strcmp value>) #458

Closed
nud opened this issue May 6, 2020 · 1 comment
Closed

Comments

@nud
Copy link
Contributor

nud commented May 6, 2020

Most XML attributes are not unescaped by the XML parser. After checking the source code it looks like only <ereg> is.

While it has no practical consequences most of the time, it makes it impossible to e.g. use <strcmp> to do something like this:

  <strcmp
      assign_to="result"
      variable="strvar"
      value="&#34;Some User&#34; &lt;sip:[email protected]&gt;"
      />

I suppose solving #31 would fix the problem globally, but in the meantime unescaping at least attributes that are meant to contain strings would be a nice improvement.

nud added a commit to nud/sipp that referenced this issue May 6, 2020
This changes the behaviour of `xp_get_string()` in order to
systematically unescape the returned values, as other XML parsers do.
The custom unescaping in the handling of the `<ereg>` element has been
removed as it is now unneeded.

This will make it possible to e.g. compare strings that contain special
XML characters using `<strcmp>`.

A regression test case has been added to highlight the problem.

SIPp#458
nud added a commit to nud/sipp that referenced this issue May 6, 2020
This changes the behaviour of `xp_get_string()` in order to
systematically unescape the returned values, as other XML parsers do.
The custom unescaping in the handling of the `<ereg>` element has been
removed as it is now unneeded.

This will make it possible to e.g. compare strings that contain special
XML characters using `<strcmp>`.

A regression test case has been added to highlight the problem.

SIPp#458
nud added a commit to nud/sipp that referenced this issue May 6, 2020
This changes the behaviour of `xp_get_string()` in order to
systematically unescape the returned values, as other XML parsers do.
The custom unescaping in the handling of the `<ereg>` element has been
removed as it is now unneeded.

This will make it possible to e.g. compare strings that contain special
XML characters using `<strcmp>`.

A regression test case has been added to highlight the problem.

SIPp#458
wdoekes pushed a commit that referenced this issue May 10, 2020
This changes the behaviour of `xp_get_string()` in order to
systematically unescape the returned values, as other XML parsers do.
The custom unescaping in the handling of the `<ereg>` element has been
removed as it is now unneeded.

This will make it possible to e.g. compare strings that contain special
XML characters using `<strcmp>`.

A regression test case has been added to highlight the problem.

#458
@wdoekes
Copy link
Member

wdoekes commented May 10, 2020

Thanks @nud !

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