Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #22951, comment 28


Ignore:
Timestamp:
11/10/2022 09:30:22 PM (16 months ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22951, comment 28

    initial v1  
    16163. Check if `http://` is allowed in `$allowed_protocols`. If yes, check if the string starts with `http://` case-insensitive. If yes, short-circuit.
    1717
    18 This will catch the most common use cases and will probably speed up `wp_kses_bad_protocol()` quite a bit. Don't think it needs to use regex at all. Seems `stripos( $string, 'https://` ) === 0` would be enough, and a lot faster.
     18This will catch the most common use cases and will probably speed up `wp_kses_bad_protocol()` quite a bit. Don't think it needs to use regex at all. Seems `stripos( $string, 'https://' ) === 0` would be enough, and a lot faster.