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.
Bug fix (non-breaking change which fixes an issue)
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:
1. Create a website with an asset named “Logo.png”.
2. Reference the image in HTML using “logo.png” or “LoGo.png”.
3. Run the project to confirm that both references display the image correctly.
• Test A: Verified website test with multiple image case references.
• Test B: Unit test added to ensure URL paths are downcased before processing.
Checklist:
My code follows the style guidelines of this project
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
Any dependent changes have been merged and published in downstream modules
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: