Handle "charset" attribute for script HTML tags in drupal_get_js

Created on 26 September 2011, almost 14 years ago
Updated 19 July 2023, about 2 years ago

Hi,

Right now, both functions "drupal_add_js" and "drupal_get_js" doesn't handle the "charset" attribute for script HTML tags.
This is a very big problem for those who want to load on the same page scripts in different charsets.

This issue could probably be handled very quickly, I'm sure it's not complicated.
I think the only thing to do is to add support for this attribute in the "drupal_get_js" function.

after this change, it will be possible to call "drupal_add_js" with an option "charset" => "utf-8" for example.
When this option is added, the HTML tag generated will have the 'charset="utf-8"' attribute.

Thanks,

Nicolas

✨ Feature request
Status

Postponed: needs info

Version

9.5

Component
BaseΒ  β†’

Last updated about 6 hours ago

Created by

πŸ‡«πŸ‡·France nicolas.deveaud

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024