Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I think that could be a good thing add the meta generator in the drupal core themes.
<meta name="generator" content="Drupal 7" />
We can indicate de major version, but not the subversion to prevent the easy reveal potential vulnerabilities in outdated sites.
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedThat's already there:
Comment #2
oriol_e9gOps!! This is now added in Drupal 7
Comment #3
oriol_e9gComment #4
espirates CreditAttribution: espirates commentedHow to remove the meta generator in Drupal 7 ? I don't want it and I suspect many won't either or should a module be made to remove it ?
Comment #5
Mark TrappThe following should remove the element:
Comment #6
klonosI have tried the code in #5 (minus the closing php tag and replaced the
mymodule
part with my theme's actual name) in my theme's template.php in latest D7 dev and it simply won't do magic any more :/I have also tried various other flavors suggested around d.o and elsewhere over the internet like using
&$head_elements
instead of&$elements
andmeta_generator
instead ofsystem_meta_generator
to no avail. Am I doing something wrong or did something perhaps change in core in the meantime?PS: sorry for hijacking this issue but I didn't want to file a duplicate/related. I will revert category and status back to the previous once I get a reply. Thanx beforehand.
Comment #7
klonos...the code in /includes/common.inc is:
So
&$elements
andsystem_meta_generator
should be the ones to work (in theory at least).PS: the http://drupal.org part in the above code snippet should not be converted btw. There must be something wrong with the text filter.
Comment #8
Mark TrappPlease don't hijack issues like this. The correct course of action is to indeed create a new support request (or, alternatively, ask on Drupal Answers or utilize any of the other support options).
Comment #9
klonosMark, you are right but you need to chill. I've been around d.o long enough to know how things work, but as I said:
I didn't want to file a separate issue simply to be pointed back to #5.
I also said:
Happy now?: #1904556: Cannot disable the "Generator" meta tag anymore through mytheme_html_head_alter