-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_title() in testharness.js fails to extract filename if the path contain a full stop (.) #50693
Comments
johannesodland
added a commit
to johannesodland/wpt
that referenced
this issue
Feb 13, 2025
…ters (.) web-platform-tests#50693 The current implementation of `get_title()` assumes that the path does not contain a full stop character. If it does, `get_title()` would return parts of the path, in stead of the filename. The pathname `/a.path/filename.html` would cause `get_title()` to return `.path` instead of the expected `filename`. This change fixed the issue by trimming the path away before searching for the extension. It maintains the current behavior, where it only keeps the first part of the filename if the filename contains multiple full stop characters. `/path/filename.foo.html` still returns `filename`.
johannesodland
added a commit
to johannesodland/wpt
that referenced
this issue
Feb 13, 2025
…ters (.) web-platform-tests#50693 The current implementation of `get_title()` assumes that the path does not contain a full stop character. If it does, `get_title()` would return parts of the path, in stead of the filename. The pathname `/a.path/filename.html` would cause `get_title()` to return `.path` instead of the expected `filename`. This change fixes the issue by trimming the path away before searching for the extension. It maintains the current behavior, where it only keeps the first part of the filename if the filename contains multiple full stop characters. `/path/filename.foo.html` still returns `filename`.
johannesodland
added a commit
to johannesodland/wpt
that referenced
this issue
Feb 15, 2025
…ters (.) web-platform-tests#50693 The current implementation of `get_title()` assumes that the path does not contain a full stop character. If it does, `get_title()` would return parts of the path, in stead of the filename. The pathname `/a.path/filename.html` would cause `get_title()` to return `.path` instead of the expected `filename`. This change fixes the issue by trimming the path away before searching for the extension. It maintains the current behavior, where it only keeps the first part of the filename if the filename contains multiple full stop characters. `/path/filename.foo.html` still returns `filename`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The implementation assumes that only the filename contains full stop characters.
If the path contains a full stop, the function returns a part of the path structure instead of the filename.
As an example, the pathname
/a.path/testname.html
would result inget_title()
returning.path/
instead oftestname
.This issue causes tests to fail in the downstream webkit project if tests are run from a folder structure containing a full stup.
https://bugs.webkit.org/show_bug.cgi?id=287285
The text was updated successfully, but these errors were encountered: