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

the quotes wrapping the variables are escaping the title text #358

Merged
merged 1 commit into from
May 21, 2022

Conversation

martinsre
Copy link
Contributor

@martinsre martinsre commented May 17, 2022

Description

The quotes are escaping the title text, which is making the ld+json parsing failing.
ex: "John's blog" will be converted to "John\x27s Blog" which is not parsable as ld+json.
Discovered using Google search console (https://search.google.com/) SEO analyse.
Error:"Unparsable structured data > Bad escape sequence in string"
Ref: https://support.google.com/webmasters/answer/9166415#error_types

Issue Number:


Additional Information (Optional)

This seems to be a common hugo problem, for me this solution solved it.
I saw the | jsonify | safeJS options on the thread: gohugoio/hugo#8386


Checklist

Yes, I included all necessary artefacts, including:

  • Tests
  • Documentation
  • Implementation (Code and Ressources)
  • Example

Testing Checklist

Yes, I ensured that all of the following scenarios were tested:

  • Desktop Light Mode (Default)
  • Desktop Dark Mode
  • Desktop Light RTL Mode
  • Desktop Dark RTL Mode
  • Mobile Light Mode
  • Mobile Dark Mode
  • Mobile Light RTL Mode
  • Mobile Dark RTL Mode

Notify the following users

@lxndrblz

The quotes are escaping the title text, which is making the ld+json parsing failing.
ex: John's blog will be converted to "John\x27s Blog" which is not parsable. 
Discovered using Google search console (https://search.google.com/) SEO analyse.  Error:
Unparsable structured data > Bad escape sequence in string
@netlify
Copy link

netlify bot commented May 17, 2022

Deploy Preview for anatole-demo ready!

Name Link
🔨 Latest commit 4be8896
🔍 Latest deploy log https://app.netlify.com/sites/anatole-demo/deploys/6284205982d68e0008e9c568
😎 Deploy Preview https://deploy-preview-358--anatole-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@lxndrblz lxndrblz self-assigned this May 21, 2022
@lxndrblz lxndrblz added the bug Something isn't working label May 21, 2022
Copy link
Owner

@lxndrblz lxndrblz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martinsre LGTM. Thanks for your PR.

@lxndrblz lxndrblz merged commit c0c367c into lxndrblz:master May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants