Title: Title attribute processed
Last modified: May 16, 2017

---

# Title attribute processed

 *  Resolved [Vincent Poirier](https://wordpress.org/support/users/magikweb/)
 * (@magikweb)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/)
 * How can we ignore the title attributes? For some reason it’s hyphenated like 
   crazy.
    See: [https://prnt.sc/f8iftm](https://prnt.sc/f8iftm) Or view it live:
   [https://www.magikweb.ca/blogue](https://www.magikweb.ca/blogue) (Hover on the
   WWW picture)
 * Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9139692)
 * Hello [@magikweb](https://wordpress.org/support/users/magikweb/)!
 * Please have a look at the [first question in the FAQ](https://code.mundschenk.at/wp-typography/frequently-asked-questions/).
   It should provide what you need to adapt your templates to use `the_title_attribute`
   instead of `the_title`. (It’s not about post titles in your case, but the underlying
   problem is the same.)
    -  This reply was modified 9 years ago by [pepe](https://wordpress.org/support/users/pputzer/).
 *  Thread Starter [Vincent Poirier](https://wordpress.org/support/users/magikweb/)
 * (@magikweb)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9141247)
 * Thank you for the help. I checked and the right function is called (I’m using
   Theme X).
    To fix the issue, I added the _entry-thumb_ class in the “Ignore CSS
   classes” field and it fixed it.
 * Thanks again!
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9142604)
 * That’s slightly weird, because if that `&shy;` is resulting from filtering `the_content`,
   attribute nodes (like the `title` attribute of the `<a>` tag) should not be modified
   by the parser. What does the template generating that HTML code look like?
 *  Thread Starter [Vincent Poirier](https://wordpress.org/support/users/magikweb/)
 * (@magikweb)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9142648)
 * I may have looked at the wrong template file since there are many, but all occurrences
   had the right function used as far as I could see.
    This is where the issue was
   happening: [https://www.magikweb.ca/blogue](https://www.magikweb.ca/blogue)
 * And this is the HTML code of that template (good luck to my markdown and no preview):
 *     ```
       switch ( is_singular() ) {
           case true:
             printf( '<div class="entry-thumb">%s</div>', $thumb );
             break;
           case false:
             printf( '<a href="%1$s" class="entry-thumb" title="%2$s">%3$s</a>',
               esc_url( get_permalink() ),
               esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ),
               $thumb
             );
             break;
         }
       ```
   
 * If you’d like more details to validate and make sure it’s not a bug, I can help
   you out. Like I said, it might be my own error that I am not looking at the right
   place, but I hardly think I’d be in the wrong file since it’s the only one with
   the class “entry-thumb”.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9142677)
 * Yeah, I’d like to check what’s going one there. Can you tell me more about the
   context of that template snippet? Is there some kind of output buffering or something?
   I still see the `&shy;`s in Chrome, BTW. Have you disabled your fix again?
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9142689)
 * (BTW, why are the conditional hyphens in the title a problem? Entities should
   be perfectly harmless in an attribute.)
 *  Thread Starter [Vincent Poirier](https://wordpress.org/support/users/magikweb/)
 * (@magikweb)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9142705)
 * You’ve made me realize something important, it’s apparently not fixed! I tested
   it on Firefox on which it’s already OK, but on Chrome it doesn’t work, even with
   the CSS class ignored.
 * On Google Chrome it’s the same.
 * It’s visually an issue when optimizing our SEO, like “uti-li-ser” is the word“
   utiliser”.
 * I’ll have to look into it furthermore…
 * I don’t mind giving you access in private (email) if you’d like to check it out.
   It’s nothing big, but if the plugin can be improved, that’ll help us at the same
   time.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9142746)
 * You should not see “uti-li-ser” on hover. As for SEO, Google is smart enough 
   to know the meaning of `&shy;` (i.e. to ignore it). But still, from that template
   snippet, the soft hyphens should not be there at all. I don’t need access to 
   your site, but it’s probably easier if we discuss this via mail. Just leave me
   a comment on [https://code.mundschenk.at/wp-typography/](https://code.mundschenk.at/wp-typography/)
   if you’d like to get in touch.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9168781)
 * [@magikweb](https://wordpress.org/support/users/magikweb/) I’ve not gotten your
   contact info yet.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9206725)
 * [@magikweb](https://wordpress.org/support/users/magikweb/): I’ve looked at the
   code again and I realized why it works the way it works: `the_title_attribute`
   does not circumvent all the filters hanging on `the_title`, it just uses `strip_tags`
   to remove HTML tags afterwards.
 * What `strip_tags` does not remove is the soft hyphens (`&shy;`) added by hyphenation(
   which you can disable for post titles, by the way). If you want those gone, you
   would have to run the output of `the_title_attribute` through `str_replace` to
   remove those added characters:
 * `$clean_title = str_replace( array( \PHP_Typography\Strings::uchr( 173 ), \PHP_Typography\
   Strings::uchr( 8203 ) ), '', the_title_attribute( 'echo=0' ) );`
 * (The example is for the upcoming version 4.2.0, to use with 4.1.x, you have to
   use `\PHP_Typography\uchr` to access the same function. The snippet also removes
   any zero-width spaces that might be added by some of wp-Typography’s fixes.)

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Title attribute processed’ is closed to new replies.

 * ![](https://ps.w.org/wp-typography/assets/icon.svg?rev=2663995)
 * [wp-Typography](https://wordpress.org/plugins/wp-typography/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-typography/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-typography/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-typography/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-typography/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-typography/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [pepe](https://wordpress.org/support/users/pputzer/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/title-attribute-processed/#post-9206725)
 * Status: resolved