-
Notifications
You must be signed in to change notification settings - Fork 22
Remove deprecated type attribute from link and script tags #68
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
base: 6.x
Are you sure you want to change the base?
Conversation
WalkthroughThe changes remove explicit MIME type attributes ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
🧰 Additional context used🧬 Code graph analysis (1)src/Helper/Scripts.php (1)
🔇 Additional comments (10)
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 |
| { | ||
| $attr = $this->attr(null, $attr); | ||
| $tag = "<script $attr>$script</script>"; | ||
| $tag = $attr ? "<script $attr>$script</script>" : "<script>$script</script>"; |
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.
Do we need this ? I think $attr will be empty string if $attr is empty. Any reason you bring this ?
Summary
Following up on PR #64, this PR removes the remaining deprecated
typeattributes:type="text/css"from<link>tags infixAttr()type="text/javascript"from<script>tags inattr()In HTML5,
type="text/css"for stylesheets andtype="text/javascript"for scripts are the defaults and no longer required.Reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-type
Summary by CodeRabbit
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.