Skip to content

Commit 9fea6c8

Browse files
author
Marco Pereirinha
committed
Sanitize the context after the filter
1 parent 273da86 commit 9fea6c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

php/class-utils.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,8 @@ public static function get_media_context( $attachment_id = null ) {
11411141
*
11421142
* @return {string}
11431143
*/
1144-
return apply_filters( 'cloudinary_media_context', 'default', $attachment_id );
1144+
$context = apply_filters( 'cloudinary_media_context', 'default', $attachment_id );
1145+
1146+
return sanitize_key( $context );
11451147
}
11461148
}

0 commit comments

Comments
 (0)