Fix aeweb case sensitivity for asset names #1580
Merged
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.
Description
This pull request addresses the issue of case sensitivity in asset names, which was causing user inconvenience when trying to reference assets with different letter cases. For instance, if an asset was named “Logo.png” and referenced in HTML as “logo.png,” AEWebsite would fail to display the image correctly.
The solution normalizes the URL paths by downcasing them before processing, ensuring that assets can be referenced in a case-insensitive manner.
Fixes #1049
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
To verify the changes, I created a simple test website with an index.html file, style.css, and an image file (Logo.png) in the assets/images folder. I added two image references in the HTML file, one using logo.png and another using LoGo.png. The fix was verified by confirming that both references successfully displayed the image.
I also added a unit test that verifies the url_path is downcased before further processing.
Steps to reproduce:
Checklist: