mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
KSES: Use the polyfilled PHP 8 string functions in _wp_kses_allow_pdf_objects():
* `str_contains()` * `str_ends_with()` * `str_starts_with()` Additionally, include a test for a PDF file in an `<object>` tag with an unsupported protocol. Follow-up to [51963], [52039], [52040], [52304], [52309]. Props TobiasBg, ramonopoly. See #54261. git-svn-id: https://develop.svn.wordpress.org/trunk@52326 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1588,10 +1588,14 @@ EOF;
|
||||
'<object type="application/pdf" data="https://example.org/foo.php" />',
|
||||
'',
|
||||
),
|
||||
'protocol relative url' => array(
|
||||
'protocol-relative url' => array(
|
||||
'<object type="application/pdf" data="//example.org/foo.pdf" />',
|
||||
'',
|
||||
),
|
||||
'unsupported protocol' => array(
|
||||
'<object type="application/pdf" data="ftp://example.org/foo.pdf" />',
|
||||
'',
|
||||
),
|
||||
'relative url' => array(
|
||||
'<object type="application/pdf" data="/cat/foo.pdf" />',
|
||||
'',
|
||||
|
||||
Reference in New Issue
Block a user