Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reset xmlXPathContext state variables before each evaluation
If we're re-using the xmlXPathContext object, there's a chance that the context variables will be trashed by recursive custom functions. In #3378 (comment), Nick advised: > Note that if you use a single XPath context and support custom XPath > extension functions, a custom function could evaluate XPath > expressions recursively which will lead to corruption of context > variables. This is mostly due to some design mistakes in libxml2. So let's set these context variables back to their default.
- Loading branch information