Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags in linkedData should be stripped before output #17

Open
craigwilcox opened this issue Oct 29, 2020 · 1 comment
Open

Tags in linkedData should be stripped before output #17

craigwilcox opened this issue Oct 29, 2020 · 1 comment
Assignees

Comments

@craigwilcox
Copy link
Collaborator

craigwilcox commented Oct 29, 2020

Hi @kidunot89,

We're getting some errors from the structured data tool regarding the output of linked data for ld+json tags.

query MyQuery {
  events {
    nodes {
      linkedData {
        name
        description

      }
    }
  }
}

generates this:

{
  "data": {
    "events": {
      "nodes": [
        {
          "linkedData": {
            "name": "Stitcher’s Garden 2021, Mission Viejo, 12 Sessions, $",
            "description": "<p>Learn fusible applique and how to incorporate your machine\\'s decorative stitches into the appliques to create these pretty, each-one-different blocks!  Each month you will utilize many decorative stitches, learn how to use the different feet available for your machine and new sewing techniques such as machine applique, couching, bobbin work and piping and more!  This [...]</p>\\n<p><a class="btn btn-secondary understrap-read-more-link" href="https://www.moores-sew.com/sewing-class/stitchers-garden-2021-mission-viejo-12-sessions/2020-11-04/">Read More...</a></p>\\n"
          }
        },

When this is run through the Rich Results test (https://search.google.com/test/rich-results?utm_campaign=sdtt&utm_medium=url&id=kCQzL5c3tJzF5HEJDiMOYQ), we get the error "Bad escape sequence in string."

It seems we need to use strip the tags and decode before the linkedData is output. Maybe echo strip_tags(html_entity_decode($yourString));

Would appreciate it if you could handle this.

Thanks,
Craig

@kidunot89
Copy link
Collaborator

Hey, not sure why this is happening but the values for the those files are the same as the following

{
  event(...) {
    content(format: RAW)
    title
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants