mirror of
https://github.com/roundcube/roundcubemail.git
synced 2025-12-27 23:45:58 +00:00
Also "wash" the name attribute of textarea and select
Some checks failed
E2E / Linux / PHP ${{ matrix.php }} (8.1) (push) Has been cancelled
E2E / Linux / PHP ${{ matrix.php }} (8.3) (push) Has been cancelled
CI / Coding Style (push) Has been cancelled
CI / Static Analysis (push) Has been cancelled
Message Rendering / Linux / PHP 8.3 (push) Has been cancelled
Unit / Linux / PHP ${{ matrix.php }} (8.1) (push) Has been cancelled
Unit / Linux / PHP ${{ matrix.php }} (8.2) (push) Has been cancelled
Unit / Linux / PHP ${{ matrix.php }} (8.3) (push) Has been cancelled
Unit / Linux / PHP ${{ matrix.php }} (8.4) (push) Has been cancelled
Unit / Windows / PHP ${{ matrix.php }} (8.1) (push) Has been cancelled
Unit / Windows / PHP ${{ matrix.php }} (8.2) (push) Has been cancelled
Unit / Windows / PHP ${{ matrix.php }} (8.3) (push) Has been cancelled
Unit / Windows / PHP ${{ matrix.php }} (8.4) (push) Has been cancelled
Some checks failed
E2E / Linux / PHP ${{ matrix.php }} (8.1) (push) Has been cancelled
E2E / Linux / PHP ${{ matrix.php }} (8.3) (push) Has been cancelled
CI / Coding Style (push) Has been cancelled
CI / Static Analysis (push) Has been cancelled
Message Rendering / Linux / PHP 8.3 (push) Has been cancelled
Unit / Linux / PHP ${{ matrix.php }} (8.1) (push) Has been cancelled
Unit / Linux / PHP ${{ matrix.php }} (8.2) (push) Has been cancelled
Unit / Linux / PHP ${{ matrix.php }} (8.3) (push) Has been cancelled
Unit / Linux / PHP ${{ matrix.php }} (8.4) (push) Has been cancelled
Unit / Windows / PHP ${{ matrix.php }} (8.1) (push) Has been cancelled
Unit / Windows / PHP ${{ matrix.php }} (8.2) (push) Has been cancelled
Unit / Windows / PHP ${{ matrix.php }} (8.3) (push) Has been cancelled
Unit / Windows / PHP ${{ matrix.php }} (8.4) (push) Has been cancelled
This commit is contained in:
parent
56fb07a478
commit
fd7819d342
@ -326,7 +326,7 @@ class rcube_washtml
|
||||
$out = $value;
|
||||
}
|
||||
} elseif ($this->_css_prefix !== null
|
||||
&& (in_array($key, ['id', 'class', 'for']) || ($key == 'name' && in_array($node->nodeName, ['a', 'img', 'input', 'form'])))
|
||||
&& (in_array($key, ['id', 'class', 'for']) || ($key == 'name' && in_array($node->nodeName, ['a', 'img', 'input', 'form', 'select', 'textarea'])))
|
||||
) {
|
||||
$out = preg_replace('/(\S+)/', $this->_css_prefix . '\1', $value);
|
||||
} elseif ($key == 'xmlns' && !strpos($value, '://')) {
|
||||
|
||||
@ -721,7 +721,16 @@ class WashtmlTest extends TestCase
|
||||
|
||||
$html = '<meta content="something" name="description"><input name="myform" type="submit" /></form>';
|
||||
$washed = $washer->wash($html);
|
||||
$this->assertStringContainsString('name="testmyform"', $washed);
|
||||
$this->assertStringNotContainsString('name="description"', $washed);
|
||||
$this->assertStringContainsString('input name="testmyform"', $washed);
|
||||
|
||||
$html = '<textarea name="something" />';
|
||||
$washed = $washer->wash($html);
|
||||
$this->assertStringContainsString('name="testsomething"', $washed);
|
||||
|
||||
$html = '<select name="something" />';
|
||||
$washed = $washer->wash($html);
|
||||
$this->assertStringContainsString('name="testsomething"', $washed);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user