-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[stable25] Link reference provider: Improve content-type check #36053
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
Conversation
| if ($linkContentType !== 'text/html') { | ||
| $expectedContentType = 'text/html'; | ||
| // check the header begins with the expected content type | ||
| if (substr($linkContentType, 0, strlen($expectedContentType)) !== $expectedContentType) { |
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.
maybe we should match "text/html;" with semicolon, otherwise "text/html5" or anything else would match as well
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.
The value can also just be text/html so we would need to cover both cases:
- value is exactly
text/html - OR value starts with
text/html;
Right?
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.
yes, that
… with text/html Signed-off-by: Julien Veyssier <[email protected]>
7dfb22d to
e9dc352
Compare
PVince81
left a comment
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.
👍 thanks for the adjustment
backport of #36043