I want to use Myanmar Unicode text on my blog. Unfortunatly, pseudo-Unicode Myanmar fonts are common. So, I am writing a plugin that will suround all Myanmar phrases with HTML span tags, and use css to select the proper font.
Everything works fine for content, comments, etc. However, after adding HTML using the the_title hook, that HTML gets escaped, and then included in the title attribute of the link tag in the recent posts section. In addition, I'm seeing the raw HTML tags in the post name on my admin post screen.
How should I go about solving this problem? I prefer to do everything from within my plugin, not change the theme files or something.
Here is my code:
add_filter( 'the_title', 'addThemSpans');
function addThemSpans($theTitle) {
// functionality to add span tags to $theTitle so that a title that looks like this...
// LatinTextHere ကကကကက MoreLatinText
// becomes this...
// LatinTextHere <span class="myText">ကကကကက</span> MoreLatinText
// in the final output.
return $theModifiedTitle;
}
As it is now, the title attribute for the link in the recent posts sidebar widget is set to:
LatinTextHere <span class='myText'>ကကကကက</span><span class='myText'>ကကကကက</span> MoreLatinText
Which is not right.

<span>s. – EAMann♦ Jan 19 at 15:01$theModifiedTitlelooks like the example I gave. – Ben Sharon Jan 19 at 15:17