• Hey,

    So I’m trying to modify my site’s description meta tags, so i’ve got this code:

    elseif (is_category('')) { echo '<meta name="description" content="'; echo category_description(); echo '">'; }

    It works fine and dandy, however, so my my category descriptions have characters like ” ‘ < > etc.

    Which can output something like:

    <meta name="description" content="orem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam bibendum imperdied&.#.8.2.1.7.;.s (without the dots)

    I’ve been searching day and night for the past 3 days to find a solution to fix this, and make these html characther codes return to normal, i.e.:

    <meta name="description" content="orem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam bibendum imperdied's

    Help? ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter darthb0o

    (@darthb0o)

    Hmm… Anyone?

    Cal

    (@themesbycal)

    Sorry, I read this earlier and am unsure what you are saying. Are you saying that it doesn’t output the characters < properly? Instead it puts in funky code? Do you have a link?

    Thread Starter darthb0o

    (@darthb0o)

    Look at the description tag here: https://anime-wallpapers.com/ah-my-goddess

    Basically, I want to remove the HTML char code, and display it as normal within the meta tag.

    Thread Starter darthb0o

    (@darthb0o)

    So Heaven&.#.8.2.1.7;s (without the dots) becomes Heaven’s.

    Cal

    (@themesbycal)

    did you try and put the code like
    &apos;

    rather than the actual apostrophe?
    Just try and put that in your description in place of the actual apostrophe…..

    not sure if it will work but it’s the only thing
    i can think of….

    Thread Starter darthb0o

    (@darthb0o)

    I was to strip away any html code within the description meta tag.

    Your suggestion wont work, but thanks for trying. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘HTML Characters Replacing ” < > ‘ etc.’ is closed to new replies.