Title Hello world!@#$%^*(),.;:\
will work but any title you enter containing ' " < > &
characters won’t work because in $content
variable you have escaped HTML entities so Mal’s Post becomes Mal’s Post
.
To bypass it you can use sanitize_title
function along with get_page_by_path
.
function shortcode_equipment($atts, $content = null) {
$path = sanitize_title($content);
$equipment = get_page_by_path( $path, OBJECT, 'equipment');
Rest of code works as before.