在get值和anchor标记之间添加斜杠以修复safari问题

Safari doesn't carry over anchor tags when redirecting to a page.

I currently have following url

/?categorie=categoryname#menu-items

This works fine on all browsers except Safari. I have searched around and the solutions might be to change that url to this:

/?categorie=categoryname/#menu-items

So how do i add the extra '/' to my url. I can't just add it to my get value because i filter results based on that value.

This is the code that generates the url:

<?php
    $menu_terms = get_terms("menu_category"); // get all categories, but you can use any taxonomy
    $count = count($menu_terms); //How many are they?
    if ( $count > 0 ){  //If there are more than 0 terms
        foreach ( $menu_terms as $term ) {
             ?>
            <div class="form-styling">

                <form action="/#menu-items" method="get">
                    <input type="hidden" name="categorie" value="<?php echo $term->slug; ?>">
                    <input class="filter-button" type="submit" value="<?php echo $term->name; ?>">
                </form>

            </div>
            <?php
            //create a list item with the current term slug for sorting, and name for label
        }
    }
?>