Do shortcode attributes in WordPress need escaping if it's user inputted data?
This plugin suggests accepting unsanitised from user input and passing it through via the shortcode. https://connekthq.com/plugins/ajax-load-more/extensions/relevanssi/
Surely this should be sanitised similar to my example below?
I am I write to think this should be sanitised and is my method the recommended way?
$term = (isset($_GET['search'])) ? $_GET['search'] : '';
echo do_shortcode('[ajax_load_more id="relevanssi" search="'. esc_html($term) .'"]');