PHP and Various Single Quotes
using WordPress and adding the title of a post to be
Jane's Addiction
When it's viewed in the page it comes out as
开发者_如何学JAVAJane’s Addiction
Please note the different single quote.
Any sort of replace on the 2nd version of the single quote doesn't seem to work. I want to replace it with a "normal" single quote as shown in first example as it doesn't work when using tags.
Thanks,
JJ
This is apparently caused by the wptexturize
function.
While I haven't tried any of these fixes/workarounds myself, this page does provide a few that you could try.
There is a plugin created by Alex King called Alex King's wp-unformatted plugin which does the remove filter functions for you so you do not need to make edits to your templates and will work even if you change templates. The site to download it can be found below: http://crowdfavorite.com/wordpress/plugins/wp-unformatted/
To use it all you have to do is add a custom field in your post called sandpaper and set the value to 1. This way you can change it on a per post basis.
精彩评论