[Bug Report] Yoast FAQ block encodes HTML tags
-
Hi there,
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.It seems that the plugin encodes the text and that causes the problem, as it encodes the tag too. For example,
<br>
becomesu003cbr/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"},
It can be easily fixed by escaping HTML tags while encoding the text.
Thanks in advance,
Ahmed Elgameel
- The topic ‘[Bug Report] Yoast FAQ block encodes HTML tags’ is closed to new replies.