Changeset 58361
- Timestamp:
- 06/07/2024 04:48:42 PM (6 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r58278 r58361 6069 6069 $message, 6070 6070 array( 6071 'a' => array( 'href'),6072 'br' ,6073 'code' ,6074 'em' ,6075 'strong' ,6071 'a' => array( 'href' => true ), 6072 'br' => array(), 6073 'code' => array(), 6074 'em' => array(), 6075 'strong' => array(), 6076 6076 ), 6077 6077 array( 'http', 'https' ) -
trunk/tests/phpunit/tests/functions/wpTriggerError.php
r57735 r58361 83 83 public function data_should_trigger_error() { 84 84 return array( 85 'function name and message are given' => array(85 'function name and message are given' => array( 86 86 'function_name' => 'some_function', 87 87 'message' => 'expected the function name and message', 88 88 'expected_message' => 'some_function(): expected the function name and message', 89 89 ), 90 'message is given' => array(90 'message is given' => array( 91 91 'function_name' => '', 92 92 'message' => 'expect only the message', 93 93 'expected_message' => 'expect only the message', 94 94 ), 95 'function name is given' => array(95 'function name is given' => array( 96 96 'function_name' => 'some_function', 97 97 'message' => '', 98 98 'expected_message' => 'some_function(): ', 99 99 ), 100 'allowed HTML elements are present in message' => array( 101 'function_name' => 'some_function', 102 'message' => '<strong>expected</strong> the function name and message', 103 'expected_message' => 'some_function(): <strong>expected</strong> the function name and message', 104 ), 105 'HTML links are present in message' => array( 106 'function_name' => 'some_function', 107 'message' => '<a href="https://example.com">expected the function name and message</a>', 108 'expected_message' => 'some_function(): <a href="https://example.com">expected the function name and message</a>', 109 ), 110 'disallowed HTML elements are present in message' => array( 111 'function_name' => 'some_function', 112 'message' => '<script>alert("expected the function name and message")</script>', 113 'expected_message' => 'some_function(): alert("expected the function name and message")', 114 ), 100 115 ); 101 116 }
Note: See TracChangeset
for help on using the changeset viewer.