BUGFIX: findByTagAndAttribute is unintentionally expanding any php found in the href/src components its regex extracts. Changed double quotes to single quotes to fix this.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@85632 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Jeremy Warne 2009-09-03 01:54:12 +00:00 committed by Sam Minnee
parent f516236cc7
commit 11283a8f51

View File

@ -103,6 +103,8 @@ class HTTP {
static function findByTagAndAttribute($content, $attribs) {
$regExps = array();
foreach($attribs as $tag => $attrib) {
$tagPrefix = (is_numeric($tag)) ? '' : "$tag ";
@ -113,7 +115,7 @@ class HTTP {
if($regExps) {
foreach($regExps as $regExp) {
$content = preg_replace($regExp, '$items[] = "$2"', $content);
$content = preg_replace($regExp, '$items[] = \'$2\'', $content);
}
}