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

Fix Bug that removes JS and CSS #61

Merged
merged 1 commit into from
Jan 21, 2021
Merged

Fix Bug that removes JS and CSS #61

merged 1 commit into from
Jan 21, 2021

Conversation

Kanti
Copy link
Contributor

@Kanti Kanti commented Jan 21, 2021

First of all, thank you for this great extension.

I encountered a strange bug there all the JS and CSS was missing from a page.
This only happens under certain circumstances.

We have a huge data attribute in our output. It holds over 3MB of JSON.

With that, the preg_split in line 189 returns false.
https://github.com/lochmueller/sourceopt/blob/master/Classes/Service/CleanHtmlService.php#L189

And there is the problem, the JS and CSS was removed from $html and is not added back to the return in line 197.
https://github.com/lochmueller/sourceopt/blob/master/Classes/Service/CleanHtmlService.php#L197

@lochmueller
Copy link
Owner

Thanks... merged this fix.

@lochmueller lochmueller merged commit 03a1108 into lochmueller:master Jan 21, 2021
@Kanti Kanti deleted the patch-1 branch January 22, 2021 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants