-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[4.0] Make sure the renderer does not manipulate the inline CSS and JS #28719
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
53d4538
make sure there rendere does not manipulate the inline CSS and JS
zero-24 e2bf53a
extend the array patch for styles too
zero-24 da87782
fix auto mode
zero-24 c3a0c3a
we need to check both
zero-24 b50d48f
styles
zero-24 169e33e
Merge branch '4.0-dev' into fix_style_script_renderer
zero-24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Will this CData tag still work without the line break above? Honestly don't know enough here to be sure.
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.
How to trigger that stuff anyway? Does joomla actually support something different than html and json?
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.
In the template of your choice something like
$this->setMimeEncoding('application/xhtml+xml')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.
Technically it does support these things - but I think it dates back to XHTML support. We can probably get rid of it (we should try and track back it's introduction first). But if we leave it in it should work
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.
It seems to be there since more than 11 years: https://github.com/joomla/joomla-cms/blame/ac1822ffb8368d1e6be4c356d45088fd196c5e81/libraries/joomla/document/html/renderer/head.php#L105
Do you know how to go deeper than that commit here: 83939b8?
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.
I mean in terms of out of scope I assume if you're running an xhtml mime type it won't work with csp ;)
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.
Does this mean it can be removed?
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.
@wilsonge @zero-24 ^^
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.
I honestly have no clue. It’s probably safe. But I’m not certain either. I certainly have no clue if the CDATA tag has any use anymore - again I suspect it’s legacy. But I’m not certain
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.
Right we would not try to add hashes there we only do for HTML: https://github.com/joomla/joomla-cms/blob/4.0-dev/plugins/system/httpheaders/httpheaders.php#L140