[Plugin: Open Menu] Menu groups with extended characters not working
-
The client has a menu group called “Soups & Salads”. Entering this name in the Menu Group Filter causes a blank page to be displayed. Using & causes it to work once, until the next time the entry is saved (as it is translated back to & and fails after that).
Attached patch causes the default template to pass the requested Menu Filter and Menu Group Filters through an htmlentities call before pattern matching. This fixes the issue.
diff --git templates/default/single-openmenu.php templates/default/single-openmenu.php index 1d57eae..ff12aba 100644 --- templates/default/single-openmenu.php +++ templates/default/single-openmenu.php @@ -15,8 +15,8 @@ $custom = get_post_custom(); $restaurant_name = (isset($custom["_restaurant_name"][0])) ? $custom["_restaurant_name"][0] : '' ; $omf_url = (isset($custom["_omf_url"][0])) ? $custom["_omf_url"][0] : '' ; - $menu_filter = ( !empty($custom["_menu_filter"][0]) ) ? $custom["_menu_filter"][0] : false ; - $group_filter = ( !empty($custom["_group_filter"][0]) ) ? $custom["_group_filter"][0] : false ; + $menu_filter = ( !empty($custom["_menu_filter"][0]) ) ? htmlentities($custom["_menu_filter"][0]) : false ; + $group_filter = ( !empty($custom["_group_filter"][0]) ) ? htmlentities($custom["_group_filter"][0]) : false ; // Get the Open Menu Options $options = get_option( 'openmenu_options' ); @@ -182,4 +182,4 @@ } get_footer(); -?> \ No newline at end of file +?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Open Menu] Menu groups with extended characters not working’ is closed to new replies.