Fix Godot docs with @ in filenames returning 404 - #2742
Open
dajiaohuang wants to merge 1 commit into
Open
dajiaohuang wants to merge 1 commit into
dajiaohuang wants to merge 1 commit into
Conversation
Enables decode_and_clean_paths for the Godot scraper, which unescapes percent-encoded characters (like %40 for @) in paths. This matches the frontend router's decodeURIComponent behavior, ensuring entries are found correctly. This is the same fix used for Ember docs which also have @ in paths. Fixes freeCodeCamp#2322
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables the
decode_and_clean_pathsoption for the Godot scraper, which fixes issue #2322 (files with '@' in the name showing 'not found').What was the problem?
class_@gdscript) are percent-encoded as%40in URLs.decodeURIComponent, converting%40back to@.decode_and_clean_paths, so paths were stored with%40still encoded, causing a mismatch when the frontend tried to look up entries with the decoded '@' character.How does this fix it?
lib/docs/scrapers/ember.rbline 49), which also has paths with '@' in them (like@ember/application).decode_and_clean_pathsunescapes percent-encoded characters during scraping, so stored paths match the decoded paths the frontend router produces. It also runs path cleaning (replacing ! ; : with -, + with plus), which is consistent with other scrapers handling special characters.Fixes #2322