mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
f516236cc7
commit
11283a8f51
@ -103,6 +103,8 @@ class HTTP {
|
|||||||
static function findByTagAndAttribute($content, $attribs) {
|
static function findByTagAndAttribute($content, $attribs) {
|
||||||
$regExps = array();
|
$regExps = array();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach($attribs as $tag => $attrib) {
|
foreach($attribs as $tag => $attrib) {
|
||||||
$tagPrefix = (is_numeric($tag)) ? '' : "$tag ";
|
$tagPrefix = (is_numeric($tag)) ? '' : "$tag ";
|
||||||
|
|
||||||
@ -113,7 +115,7 @@ class HTTP {
|
|||||||
|
|
||||||
if($regExps) {
|
if($regExps) {
|
||||||
foreach($regExps as $regExp) {
|
foreach($regExps as $regExp) {
|
||||||
$content = preg_replace($regExp, '$items[] = "$2"', $content);
|
$content = preg_replace($regExp, '$items[] = \'$2\'', $content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user