-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix broken images #2195
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
Fix broken images #2195
Conversation
- Allowed img tags to be used in summaries
📝 WalkthroughWalkthroughThe pull request modifies the Changes
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (3)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
libs/utils/src/namespaces/string.ts
(1 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
libs/utils/src/namespaces/string.ts
[error] 64-64: Unsafe usage of optional chaining.
If it short-circuits with 'undefined' the evaluation will throw TypeError here:
(lint/correctness/noUnsafeOptionalChaining)
🪛 ESLint
libs/utils/src/namespaces/string.ts
[error] 64-64: Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.
(no-unsafe-optional-chaining)
🔇 Additional comments (2)
libs/utils/src/namespaces/string.ts (2)
73-74
: Well-implemented image tag support! ✨The implementation correctly:
- Explicitly allows the
img
tag- Restricts attributes to only
src
andalt
- Maintains security by not allowing potentially dangerous attributes like
onerror
Also applies to: 81-81
66-72
: Verify security implications of allowing extensive HTML tags.While the added semantic HTML tags provide better structure, they increase the attack surface. Please ensure this aligns with your security requirements.
Run this script to check for any security discussions or previous incidents:
✅ Verification successful
HTML tags usage is secure through sanitize-html implementation
The HTML tags are used as a whitelist for the
sanitize-html
library, a well-maintained security package. This implementation follows security best practices by using a whitelist approach and allowing configuration through options. The tags listed match the default allowed tags from the sanitize-html package.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for security-related discussions about HTML sanitization rg -i "sanitize|xss|html.*security" --type mdLength of output: 47
Script:
#!/bin/bash # Check package.json for HTML sanitization libraries echo "=== Checking package dependencies ===" fd package.json --type f --exec cat {} \; | grep -i "sanitize\|dompurify\|xss\|html" echo -e "\n=== Checking HTML processing code ===" # Look for HTML processing/sanitization logic rg -i "(sanitize|purify|clean|escape).*html" --type ts -A 3 echo -e "\n=== Finding usage of HTML tags array ===" # Find where these HTML tags are used ast-grep --pattern 'const $_ = [$$$"address"$$$]'Length of output: 1751
It works, thank you. ❤️ |
Thank you for the quick fixes and proactive PRs. It's been a hectic week for me as well at work and wasn't able to give Reactive Resume the love it deserves, but you helped a ton. |
Thank you both for this incredible product |
Don't thank me. |
É. ÓTIMO |
My initial pull request (#2186) did not fix images (from issue #2182).
I hope this one will.
Please test this locally before merging just in case, so that I don't have to make a third pull request. 😅
Summary by CodeRabbit
address
,article
,aside
,footer
, andheader
.