Skip to content

Commit dcedd64

Browse files
committed
use wp_parse_url() instead of parse_url() (#47)
1 parent 0419cb2 commit dcedd64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inc/class-spcl.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@ public static function validate_links( $id ) {
183183
$found = array();
184184
foreach ( $urls as $url ) {
185185
// Skip URL if depending on acceptable protocols check.
186-
if ( ! in_array( parse_url( $url, PHP_URL_SCHEME ), $acceptable_protocols, true ) ) {
186+
if ( ! in_array( wp_parse_url( $url, PHP_URL_SCHEME ), $acceptable_protocols, true ) ) {
187187
continue;
188188
}
189189

190190
// Fragment check.
191-
$hash = parse_url( $url, PHP_URL_FRAGMENT );
191+
$hash = wp_parse_url( $url, PHP_URL_FRAGMENT );
192192
if ( $hash ) {
193193
$url = str_replace( '#' . $hash, '', $url );
194194
}

0 commit comments

Comments
 (0)