• Resolved josdejong

    (@josdejong)


    I have an article that has two double quotes ” in the description. I’m using Rank Math, and this plugin outputs a JSON object containing meta information about the page, such as the article description. Basically:

    {
      "description": "What is the "right" approach?"
    }

    When Simply Static processes the page in the output, these HTML codes are replaced with double quotes:

    {
      "description": "What is the "right" approach?"
    }

    This make the content invalid JSON. Any idea how to deal with this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Igor Benic

    (@ibenic)

    Hi @josdejong, we’ve worked on a fix for this. Next version will fix it.

    For now, you could add find the class src/class-ss-url-extractor.php, find method extract_and_replace_urls_in_script and instead of html_entity_decode( $text ) add html_entity_decode( $text, ENT_NOQUOTES )

    Thread Starter josdejong

    (@josdejong)

    That is good news, thanks!

    Plugin Author patrickposner

    (@patrickposner)

    Hey @josdejong,

    I just wanted to let you know that 2.3.0 now includes the fix for that!

    Cheers,

    Patrick

    Thread Starter josdejong

    (@josdejong)

    Thanks a lot Patrick, I can confirm that the issue with double quotes inside a JSON string is fixed in v2.3.0. Thanks a lot for your work!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘" inside JSON replaced with “, making it invalid JSON’ is closed to new replies.