ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Apostrophe in Title Field Converted to & # 8217

October 26, 2011 7:24pm

Subscribe [7]
  • #1 / Oct 26, 2011 7:24pm

    joann22

    176 posts

    This question may be related to a resolved thread.

    The apostrophe (not quotes) is being converted in the Title field upon output to browser.
    Thus, when you View Source, you’ll see the & # 8217   in the Title and not just a simple   ‘

    Is the database saving it as a & # 8217   or saving it as a   ’  ?
    Or I guess I’m asking, does the database save it as a   ’  but only upon output it converts it to & # 8217 ?

    The other custom text fields (set to None)  do not have this problem. They show a normal ‘.

    It should really not change it but just keep it as an apostrophe. Why is it changed, and only in the Title Field? Just want to understand the reasoning so I can understand better.

    Thanks!

    [updated]
    ps. EE 1.7.1 Build:  20110520

  • #2 / Oct 27, 2011 12:56pm

    Kevin Smith

    4784 posts

    Hi joann22,

    Apostrophes are stored in the database as this character, exactly:

    '

    It’s converted to this

    ...only during the template rendering. It’s part of the automatic formatting that entry titles receive during parsing, but I’m not sure the exact reasoning behind why the apostrophe is converted so. Does this cause problems for you on your site?

  • #3 / Oct 27, 2011 1:01pm

    joann22

    176 posts

    Yes, we don’t want it converted. Is there a fix or work-around? Options? Hmm… can I comment it out in core.typography.php ?

  • #4 / Oct 27, 2011 5:31pm

    joann22

    176 posts

    Any thoughts? Don’t mean to rush you for an answer. 😊

  • #5 / Oct 28, 2011 12:32pm

    joann22

    176 posts

    Any options?

  • #6 / Oct 29, 2011 6:20am

    Mark Bowen

    12637 posts

    Hi Joan22,

    Can I ask why you don’t want it converted? The only reason I ask is that yes it does indeed get output to the source code as the entity number but in your actual rendered page it should be showing up fine.

    I don’t mean to sound rude when I ask this but I’m just wondering why you need it to show up as an apostrophe in the source code?

    Thanks,

    Mark

  • #7 / Oct 29, 2011 12:00pm

    joann22

    176 posts

    Hi Mark,
    Thanks for the reply. Since the system and the site is already utf-8, there is no need to convert the apostrophe. It is also saved as an actual apostrophe in the database, as Kevin said.

    Is there a work around?

  • #8 / Oct 30, 2011 1:59pm

    soundseller

    52 posts

    I am having the same problem with apostrophes in the page titles.

  • #9 / Nov 01, 2011 10:33am

    Sue Crocker

    26054 posts

    Joann and soundseller - I’d tend to use one of the available Find and Replace plugins and change it out that way. I know it’s not an ideal solution, but it will work.

  • #10 / Jun 26, 2012 12:19pm

    vmills

    96 posts

    Sue: I’m having the same issue. The entity for apostrophe is displaying in the title tag (on screen, not just in source). I have not been able to figure out why after much searching and figured the easiest fix was the search/replace that you mentioned. So I downloaded the Low Replace plugin, but I’m not sure how to get it to display just an apostrophe.

    This tag

    {exp:low_replace find="’" replace"'"}
    changes this in the title tag
    we’re
    to this
    were

    Any ideas how to get the apostrophe back in there? Thought this might be helpful if others have the same issue.

  • #11 / Jun 27, 2012 5:49pm

    vmills

    96 posts

    It was a missing = in the code. :red: For the throngs of people wanting a solution to this issue, please know that Low Replace works with this code:

    {exp:low_replace find="’" replace="’"}
  • #12 / Jun 28, 2012 1:52pm

    Shane Eckert

    7174 posts

    Hey vmills,

    Thanks for letting us know!

    Nice work.

    cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases