It *should* work with ü replaced with u as the remove_accents function is used on the tab title before the comparison is made.
Please post a link to the page on your site that contains the tabs with special characters in the title
I’m not sure why this is not working for you as there does not seem to be any problem targeting a tab with the same title on my test site:
http://michaelatkins.co.uk/tabby-umlaut-test/?target=fruhstuck
We might be able to get some clues about the issue if you can install the simple troubleshooting plugin I made to investigate this:
<?php
/*
Plugin Name: Accent Strippage
Description: Troubleshoot the accent removal function
Author: cubecolour
Version: 1.0.0
Author URI: http://cubecolour.co.uk/
Date: 20 January 2017
*/
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Show what is returned when accents are stripped and sanitized to title format
* usage: [noaccents]content[/noaccents]
*
*/
function cc_accent_strippage( $atts, $content = null ) {
$output = '<div style="background:#e6e6e6;padding:16px">';
$output .= '<h2>Troubleshoot Stripped accents</h2>';
$output .= '<p><strong>Original content:</strong> ' . $content . '</p>';
$output .= '<p><strong>Accent stripped:</strong> ' . sanitize_title_with_dashes( remove_accents( wp_kses_decode_entities( $content ) ) ) . '</p>';
$output .= '</div>';
return $output;
}
add_shortcode('noaccents', 'cc_accent_strippage');
Then add a shortcode to your content using exactly the same text for the shortcode content as was used on your tab title
eg:
[noaccents]Frühstück[/noaccents]
-
This reply was modified 9 years, 2 months ago by
cubecolour.
-
This reply was modified 9 years, 2 months ago by
cubecolour. Reason: typo
Thank you very very much. That helped! There were two problems:
First I wrote “ü ;” instead of “ü” for testing purposes but I didn’t change it back.
Second is that only in german, all other languages work as you said, ü is changed to “ue” instead of “u”, as you can see on my site (I leave your php code there for some time if you want to check it out).
Anyway thank you very much for your help!
Aha! Yes – I can see that using a URL parameter/value of ?target=fruehstueck to target that tab seems to be working on your page.
It is interesting to learn that WordPress’s remove_accents() function would change the ü to ue for the German language, so I will add a note to the plugin’s FAQ.