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

Cookie Consent for YouTube renders as Youtube (lower case T) #433

Open
georgestephanis opened this issue Jan 24, 2025 · 1 comment
Open

Comments

@georgestephanis
Copy link
Contributor

Image

When prompting a user to agree to render YouTube videos, this is displaying as Youtube instead, due to the logic that just capitalizes the first letter --

https://github.com/Really-Simple-Plugins/complianz-gdpr/blob/d0c212e6afd4cab95dfb7a610537de137dd7316f/cookiebanner/js/complianz.js#L471

and service_nicename is just service with hyphens replaced with spaces, and let service = obj.getAttribute('data-service'); -- which is all lower-case.

So data-service="youtube" gets its first letter capitalized, but the T never gets re-capitalized.

I'm not sure if modifying the data-service parameter could cause other conflicts, so a hardcoded conditional around line 471 in complianz.js (as previously linked) of if ( 'youtube' === service_nicename ) service_nicename = 'YouTube'; would probably be the easiest fix (albeit not exactly ideal for modularity, but then ... neither is YouTube's capitalization!)

@georgestephanis
Copy link
Contributor Author

Previous adjustments to account for proper capitalization: #396

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

No branches or pull requests

1 participant