vendor/HTMLPurifier: Avoid curly braces to access array offsets
https://www.php.net/manual/en/migration74.deprecated.php#migration74.deprecated.core.array-string-access-curly-brace
This commit is contained in:
parent
0442c4f0ab
commit
67dd439673
|
@ -45,7 +45,7 @@ class HTMLPurifier_ChildDef_Custom extends HTMLPurifier_ChildDef
|
||||||
protected function _compileRegex()
|
protected function _compileRegex()
|
||||||
{
|
{
|
||||||
$raw = str_replace(' ', '', $this->dtd_regex);
|
$raw = str_replace(' ', '', $this->dtd_regex);
|
||||||
if ($raw{0} != '(') {
|
if ($raw[0] != '(') {
|
||||||
$raw = "($raw)";
|
$raw = "($raw)";
|
||||||
}
|
}
|
||||||
$el = '[#a-zA-Z0-9_.-]+';
|
$el = '[#a-zA-Z0-9_.-]+';
|
||||||
|
|
|
@ -159,7 +159,7 @@ class HTMLPurifier_Encoder
|
||||||
|
|
||||||
$len = strlen($str);
|
$len = strlen($str);
|
||||||
for ($i = 0; $i < $len; $i++) {
|
for ($i = 0; $i < $len; $i++) {
|
||||||
$in = ord($str{$i});
|
$in = ord($str[$i]);
|
||||||
$char .= $str[$i]; // append byte to char
|
$char .= $str[$i]; // append byte to char
|
||||||
if (0 == $mState) {
|
if (0 == $mState) {
|
||||||
// When mState is zero we expect either a US-ASCII character
|
// When mState is zero we expect either a US-ASCII character
|
||||||
|
|
|
@ -75,7 +75,7 @@ class HTMLPurifier_TagTransform_Font extends HTMLPurifier_TagTransform
|
||||||
if (isset($attr['size'])) {
|
if (isset($attr['size'])) {
|
||||||
// normalize large numbers
|
// normalize large numbers
|
||||||
if ($attr['size'] !== '') {
|
if ($attr['size'] !== '') {
|
||||||
if ($attr['size']{0} == '+' || $attr['size']{0} == '-') {
|
if ($attr['size'][0] == '+' || $attr['size'][0] == '-') {
|
||||||
$size = (int)$attr['size'];
|
$size = (int)$attr['size'];
|
||||||
if ($size < -2) {
|
if ($size < -2) {
|
||||||
$attr['size'] = '-2';
|
$attr['size'] = '-2';
|
||||||
|
|
Loading…
Reference in New Issue