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

Yoast FAQ block encodes HTML tags #15708

Closed
7 of 9 tasks
Elgameel opened this issue Jul 22, 2020 · 3 comments
Closed
7 of 9 tasks

Yoast FAQ block encodes HTML tags #15708

Elgameel opened this issue Jul 22, 2020 · 3 comments

Comments

@Elgameel
Copy link

Elgameel commented Jul 22, 2020

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

I've created a support thread on WP.org before submitting this Bug report: https://wordpress.org/support/topic/bug-report-yoast-faq-block-encodes-html-tags/
I have a problem with the FAQ block with the Arabic language.

The block does not support HTML tags (<a>, <strong>, <br>, <i> etc..) if the block is written in Arabic on some pages.

It seems that the plugin encodes the text and that causes the problem, as it encodes the tag too. For example, <br> becomes u003cbr/u003e, and it seems that Google does not understand that and displays it as is.

This is how a question with a link looks like in the page source:

{"@type":"Question","@id":"https://example.com/page/#faq-question-1557436439883","position":5,"url":"https://example.com/page/#faq-question-1557436439883","name":"\u2705 \u0643\u064a\u0641 \u0623\u062d\u0635\u0644 \u0639\u0644\u0649 \u062f\u0648\u0645\u064a\u0646 \u0645\u062c\u0627\u0646\u0627\u064b\u061f","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"\u064a\u0645\u0643\u0646\u0643 \u0627\u0644\u062d\u0635\u0648\u0644 \u0639\u0644\u0649 \u062f\u0648\u0645\u064a\u0646 \u0645\u062c\u0627\u0646\u0627\u064b \u0628\u0633\u0647\u0648\u0644\u0629 \u0639\u0646 \u0637\u0631\u064a\u0642 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u062e\u0635\u0648\u0645\u0627\u062a \u0648\u0627\u0644\u0639\u0631\u0648\u0636 \u0627\u0644\u062a\u064a \u062a\u0642\u062f\u0645\u0647\u0627 \u0634\u0631\u0643\u0627\u062a \u0627\u0644\u0627\u0633\u062a\u0636\u0627\u0641\u0629 \u0644\u0632\u0648\u0627\u0631 \u0645\u0648\u0642\u0639 \u0639\u0645\u064a\u062f \u0627\u0644\u0627\u0633\u062a\u0636\u0627\u0641\u0629 \u062d\u0635\u0631\u064a\u0627\u064b \u0628\u0627\u0644\u0625\u0636\u0627\u0641\u0629 \u0625\u0644\u0649 \u0627\u0644\u062a\u062e\u0641\u064a\u0636\u0627\u062a \u0639\u0644\u0649 \u0623\u0633\u0639\u0627\u0631 \u0627\u0644\u0627\u0633\u062a\u0636\u0627\u0641\u0629 \u0648\u0647\u0630\u0647 \u0623\u0641\u0636\u0644 \u0627\u0644\u0634\u0631\u0643\u0627\u062a \u0627\u0644\u062a\u064a \u062a\u0642\u062f\u0651\u0645 u003ca href=u0022https://example.com/u0022u003e\u0627\u0633\u062a\u0636\u0627\u0641\u0629 \u0648\u062f\u0648\u0645\u064a\u0646u003c/au003e \u0645\u0639\u0647\u0627 \u0645\u062c\u0627\u0646\u0627\u064b \u0639\u0646\u062f \u0627\u0644\u0634\u0631\u0627\u0621.","inLanguage":"ar"},"inLanguage":"ar"},

Although there're other pages on the same website that is almost using the same FAQ content and markup, it does not has the problem!

Please describe what you expected to happen and why.

I expected the FAQ answer to be displayed in SERPs with the same markup I use in the editor and appears on the website.

Technical info

  • If relevant, which editor is affected (or editors):
  • Classic Editor
  • Gutenberg
  • Classic Editor plugin
  • Which browser is affected (or browsers):
  • Chrome
  • Firefox
  • Safari
  • Other

Used versions

  • WordPress version: Latest
  • Yoast SEO version: Latest
  • Gutenberg plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug:
  • Tested with theme:
@Djennez
Copy link
Member

Djennez commented Jul 22, 2020

Duplicate of several issues, please check https://github.com/Yoast/wordpress-seo/issues?q=is%3Aissue+is%3Aopen+faq+html

Closing this.

@Djennez Djennez closed this as completed Jul 22, 2020
@Elgameel
Copy link
Author

Duplicate of several issues, please check https://github.com/Yoast/wordpress-seo/issues?q=is%3Aissue+is%3Aopen+faq+html

Closing this.

Why did you close it, have you read it?

I believe you didn't, it is not a duplicate!

@Djennez
Copy link
Member

Djennez commented Jul 22, 2020

The feature request here is to support HTML tags, there are issues for that. The fact that you're now using HTML tags while they are not supported seem to break encoded characters in the schema data (due to slashes). You can check this by removing the HTML tags from the blocks and see if that fixes the strange encoding that shows up in Google.

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