wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
701 stars 220 forks source link

3.18: data-wpr-hosted-gf-parameters sometimes isnot having the original data structure with some templates #7142

Open Mai-Saad opened 3 days ago

Mai-Saad commented 3 days ago

Describe the bug While using these page templates, the data-wpr-hosted-gf-parameters is cut and not having the full data ` To Reproduce Steps to reproduce the behavior:

  1. Enable host google fonts locally
  2. Visit this page https://new.rocketlabsqa.ovh/combine-v1-v2-fonts/ or https://new.rocketlabsqa.ovh/combine-v2-fonts/ and check the source => notice data-wpr-hosted-gf-parameters="family=Goldman:wght@400;700&

Expected behavior data-wpr-hosted-gf-parameters has the whole value just like the query string when host google font is disabled i.e [family=Goldman:wght@400;700&family=Xanh+Mono:ital@0;1&family=Epilogue:ital,wght@0,300;1,400;1,500&family=Oswald:wght@200;600&family=Lora:ital,wght@1,500&family=Lora:ital,wght@1,700&family=Alatsi&family=Alata&family=Ubuntu&family=Noto+Sans+SC:wght@300&family=Cairo:wght@200&family=Amiri:ital,wght@0,400;0,700;1,700&family=Cairo:wght@200&family=Amiri:ital,wght@0,400;0,700;1,700&family=Cairo:wght@200&family=Roboto:wght@100;300&display=swap](https://fonts.googleapis.com/css2?family=Goldman:wght@400;700&family=Xanh+Mono:ital@0;1&family=Epilogue:ital,wght@0,300;1,400;1,500&family=Oswald:wght@200;600&family=Lora:ital,wght@1,500&family=Lora:ital,wght@1,700&family=Alatsi&family=Alata&family=Ubuntu&family=Noto+Sans+SC:wght@300&family=Cairo:wght@200&family=Amiri:ital,wght@0,400;0,700;1,700&family=Cairo:wght@200&family=Amiri:ital,wght@0,400;0,700;1,700&family=Cairo:wght@200&family=Roboto:wght@100;300&display=swap)

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here. Related discussion https://wp-media.slack.com/archives/CUKB44GNN/p1732610252901139