All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Smart Quotes and Low Replace

Jess 5 Aug 2015 20:51 question, complete

I feel I must be missing something terribly small, but this does not work for me using low_replace when trying to swap out a straight apostrophe for a "smart/curly" apostrophe. Unfortunately, there is a bug in Solspace calendars when using the event method, so EE does not translate these quotes automatically and I have to use a plugin. This is what I am trying, I have tried to use corresponding character codes instead of text, etc., with no success:
{exp:low_replace find="'" replace="’"}
{/exp:low_replace}

Replies

  1. Low 6 Aug 2015 10:37

    It could be the quotes and apostrophes are html encoded (entities, like " or '), rather than the actual character. Check the html source to see what the actual string is, and use that as the find="" parameter.

  2. Jess 6 Aug 2015 17:20

    Hello, thanks for your reply, they are not html encoded and are showing up in the html code as ’ and '

    I forgot to mention that this is actually throwing the following error:
    {exp:low_replace find="'" replace="’"}
    {/exp:low_replace}

    When I use the individually they work just fine, for example replacing ' with a word or ’ with a word, but when I use them together the error happens.

    I was wrapping more than just one field with the low replace code and when I just found out, when I wrap individual fields the error does not happen, so I resolved it.

    Thanks!