Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294909

DrupalWebTestCase::buildXPathQuery() tries to handle backreferences in argument values

$
0
0

Dollar signs followed by a number in the values of replacement arguments passed to DrupalWebTestCase::buildXPathQuery() seem to be handled as a regular expression back reference, causing certain values to be changed inappropriately.

$query = $this->buildXPathQuery(':test', array(':test' => '$1bc'));

I expected $query to have the value: "$1bc"
Actual value however is: "bc"

Use case: we use DrupalWebTestCase::randomString() quite often to generate node titles. DrupalWebTestCase::randomString() might generate something that is recognized as a back reference.


Viewing all articles
Browse latest Browse all 294909

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>