fix(faq): render HTML markup in FAQ answers instead of raw text - #7973
fix(faq): render HTML markup in FAQ answers instead of raw text#7973AnkitRewar11 wants to merge 1 commit into
Conversation
Signed-off-by: ankitrewar11 <rewarankit18@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe FAQ component now renders answer strings as HTML, allowing markup such as ChangesFAQ rendering
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized change renders trusted FAQ markup correctly instead of showing raw tags, with no actionable merge-blocking risk remaining after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/sections/General/Faq/index.jsParsing error: The keyword 'import' is reserved Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployment for PR #7973 removed. This PR preview was automatically pruned because we keep only the 3 most recently updated previews on GitHub Pages to stay within deployment size limits. If needed, push a new commit to this PR to generate a fresh preview. |
dhruveshmishra
left a comment
There was a problem hiding this comment.
Minimal changes ,preview looks good ,LGTM
Description
This PR fixes #7953
Fixes the FAQ section on the Playground page where raw HTML tags (e.g.
<sup>BETA</sup> ) were being displayed as plain text instead of being rendered properly.Root cause:
src/sections/General/Faq/index.jswas rendering FAQ answers using plain text interpolation (<p>{ans}</p>), which causes React to escape HTML characters instead of parsing them. Updated it to usedangerouslySetInnerHTMLso the markup (like<sup>BETA</sup>and ) renders correctly, since the FAQ data is sourced internally fromsrc/assets/data/faq/index.jsand is trusted.Notes for Reviewers
src/sections/General/Faq/index.js.Signed commits
Before

After

Summary by CodeRabbit