Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#44522 closed defect (bug) (invalid)

Distorted output when using the_title()

Reported by: konmavrakis Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Formatting Keywords:
Focuses: Cc:


I have a post with this title: "This is a test title".

If I use the_title(); the output is:
«This is a test title»

if I echo the title with $post->post_title the output is:
"This is a test title"

Even If I inspect the page, instead of " I see «.

I've also change the font-family to be Arial in order to preclude errors with the font.

I've checked in the_title() and get_the_title() and I can't seem to find anything that could cause the distortion of the output.

Attachments (1)

Screen Shot 2018-07-05 at 16.38.15.png (8.4 KB) - added by konmavrakis 3 years ago.
The output, top with the_title(), bottom with $post->post_title

Download all attachments as: .zip

Change History (2)

3 years ago

The output, top with the_title(), bottom with $post->post_title

#1 @ocean90
3 years ago

  • Component changed from Posts, Post Types to Formatting
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hello @konmavrakis, welcome to WordPress Trac!

This is produced by the wptexturize() function which is hooked into the_title. Take a look at https://developer.wordpress.org/reference/functions/wptexturize/ to learn more about what wptexturize() does.

Note: See TracTickets for help on using tickets.