Skip to content
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

[4.0] Keep Script/Style Declarations as an array instead of merge to one string #25357

Merged
merged 3 commits into from
Aug 4, 2019

Conversation

Fedik
Copy link
Member

@Fedik Fedik commented Jun 28, 2019

Summary of Changes

Keep Script/Style Declarations as an array instead of merge to one string.
For long time JDocument merge all Script/Styles declarations to a single string, which not allow to use it for stuff like type="module" (which has import statement), or micro-data type="application/ld+json", and for other types that get broken when they merged.

This patch introduce a little B.C. (for extensions which use $doc->_script directly) but I think it not very critical, and better we do it now than never.

Additionally after little changes in #25301 this patch will allow to remove specific Script/Styles declarations without parsing whole $doc->_script/_style.

Testing Instructions

Apply the patch and make sure all still works as before.

Documentation Changes Required

This is potential B.C. and need to be described https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4

The Document::_script, Document::_style store Script/Styles declarations as an array, instead of string.

@wilsonge wilsonge merged commit 86a0d88 into joomla:4.0-dev Aug 4, 2019
@wilsonge
Copy link
Contributor

wilsonge commented Aug 4, 2019

Thanks!

@wilsonge wilsonge added this to the Joomla 4.0 milestone Aug 4, 2019
@Fedik Fedik deleted the script-declaration-to-array branch August 5, 2019 06:35
@brianteeman
Copy link
Contributor

See #25788

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants