Smart quotes in a page title don’t work if it ends in a tag

If I have this content in a page title:
"A title with <em>italics</em> and quotes"
the wptexturize function (I think) produces smart quotes correctly.

However, if I have this content in a page title:
"A title with quotes and <em>italics</em>"
the first double quote is correctly converted to an opening double quote, but the last double quote is incorrectly converted to opening double quote (i.e. a 66 and not a 99).

It seems that if the title ends with a ‘>’ the smart quotes function is not working. Can anyone replicate this – is it a bug?



Source link