Problem/Motivation

Part of #3399840: [meta] Replace http urls with https urls of the respective sites in core
Unless specifically testing the 'http' protocol https should be used for URLs.

Steps to reproduce

git grep www.w3.org

Proposed resolution

Change 'http' to 'https' for www.w3.org. The xmnls in the svg files should not be changed, https://www.w3.org/2000/svg is an identifier, not a url, and it should not be https.

Remaining tasks

Changes should be made with a script. Something like
git grep -l http://test.com | xargs sed -i 's#http://test.com#https://test.com#g'. Post the commands used.
Run core/scripts/dev/commit-code-check.sh locally
Create MR

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3569459

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

quietone created an issue. See original summary.

sujal kshatri made their first commit to this issue’s fork.

paragforwork changed the visibility of the branch 3569459-replace-http-with to hidden.

ben280398 made their first commit to this issue’s fork.

ben280398’s picture

First, searched for all files containing http://www.w3.org:

git grep -l "http://www.w3.org" | head -50
This returned ~50+ files, mostly SVG files and some CKEditor vendor JS.
Then filtered out the xmlns declarations (which are identifiers, not URLs, and should stay as http):

git grep "http://www.w3.org" | grep -v "xmlns" | grep -v "2000/svg"
```

Result:
```
core/modules/link/src/AttributeXss.php: // @see http://www.w3.org/TR/html4/index/attributes.html
Binary file (standard input) matches
The binary file match is minified CKEditor JS (vendor files, not to be touched). Only one actual source file needed updating.

Fix applied:
sed -i 's#http://www.w3.org/TR/#https://www.w3.org/TR/#g' core/modules/link/src/AttributeXss.php

Verification:
Ran core/scripts/dev/commit-code-check.sh - all checks passed.

Merge Request is linked here for ease of tracking:
https://git.drupalcode.org/project/drupal/-/merge_requests/14611

sivaji_ganesh_jojodae’s picture

Status: Active » Needs work

Marking the issue as Needs Work since the pipeline is currently failing.

quietone’s picture

Status: Needs work » Needs review

@sivaji_ganesh_jojodae, not all pipeline test failures are due to the changes in the MR. We have some tests, mostly functional javascript ones, that cause random failures. Also, the change in this MR is to a comment and won't be causing a test failure.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Thank you all for your work on this issue!

I searched core for more instances of http:\/\/(www\.)?w3\.org. The only remaining results are from XML namespace (xmlns) attributes, which as noted in the issue summary should not be changed. This one looks good to me.

quietone’s picture

Assigned: Unassigned » quietone

Assigning to myself to possible commit in 24 hours, it is too late in the day for me to do a proper review.

thirteenthdown made their first commit to this issue’s fork.

thirteenthdown’s picture

I have updated all occurrences of http://www.w3.org to https://www.w3.org across the codebase. As instructed, I explicitly excluded the vendor/ and node_modules/ directories because those are external dependencies. I also reviewed the test files and confirmed none of them contain hardcoded http tests that would be broken by this change.

thirteenthdown’s picture

Status: Reviewed & tested by the community » Needs review
quietone’s picture

@thirteenthdown, Welcome to Drupal! Please read my comment on another issue you have commented on.

quietone changed the visibility of the branch 3569459-w3c-https to hidden.

quietone’s picture

Status: Needs review » Reviewed & tested by the community

I am now going to hide the latest, duplicate MR, close it and restore the status of this which was set by a core subsystem maintainer.

quietone’s picture

@ben280398, thanks for commenting all the actions you made to complete this issue. That is a good practice that is welcome on issues in Drupal.

I applied the diff and did my own searching. I also didn't find any other instances to change. Since there is only 1 change here maybe the scope is wrong and this could have been combined with other small changes sets about changing http. But we are here now so lets get this in.

  • quietone committed 075eaeb7 on 11.x
    task: #3569459 Replace http with https for www.w3.org
    
    By: ben280398
    By...

  • quietone committed 4360f0a0 on main
    task: #3569459 Replace http with https for www.w3.org
    
    By: ben280398
    By...
quietone’s picture

Version: main » 11.x-dev
Assigned: quietone » Unassigned
Status: Reviewed & tested by the community » Fixed

Committed and pushed to main and 11.x.

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.