-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
unwanted underscores in url property value #4910
Comments
Just saw this myself. Thanks for filing the bug. |
Reverting the commit that @thomas-topway-it identified, fixes the problem. |
I am affected by this issue in SMW 4.0.2 (2022-03-24). |
@thomas-topway-it has dug deep into this one. However, I think it needs manual testing. @turnstyyle - can you test and tell us if everything is working fine. |
The changes in #5396 (8f6a918) fix the biggest problem for me. After the change, clicking a link from a URL property whose value contains a space character goes to the right place. I noticed one more minor problem that may be related. URL properties whose value contains underscores render on the screen (i.e., when the property is set inline, or in contexts like Special:Browse) with the underscores changed to spaces. The link still goes to the right place (to the URL with underscores). For me, this is OK as long as the links work. This was also the case before #5396, and might be considered a separate issue. In summary, this is what I see before the changes of #5396:
And this is what I see after #5396:
|
Thank you for testing! |
@turnstyyle so the second url in the second column theoretically should and could be
I think the most correct is to remove the underscore also in captions for non-wiki url, as in the example. However currently the code, as you can see in the comment, can lead to "false-positive", I don't know if there are ways to achieve that which don't lead to "false-positive" cases. |
Yes, the fact that underscores in external URLs are rendered as spaces is unexpected and (in my opinion) undesirable.
I don't understand what this code is trying to do. It looks like it wants to distinguish wiki links from other kinds of URLs? And relies on the If long URLs disturbing the layout is a concern, maybe CSS |
hello @turnstyyle, yes, we could just remove the code supposed to identify an external wiki since it does not work, perhaps it was not the proper method. and it remains to address this #5396 (comment) I had partially updated most of the tests, but because this is really tricky (mwjames created a lot of tests, with a content difficult to understand ) I think this should be supervised by at least another key-developer (otherwise a lot of work required to update all tests will be wasted) |
perhaps my comment above contained an error
should be I think the most correct is to keep the underscore |
Setup
Issue
Spaces in urls get mistakenly underscored by contrast to what stated here
https://www.semantic-mediawiki.org/wiki/Help:Service_links
by contrast to
Steps to reproduce the observation (recommendation is to use the sandbox):
Create a URL data type and then add a link like the following
http://www.opal.unito.it/psixsite/Miscellanea%20di%20testi%20di%20genere%20diverso/Elenco%20opere/imgMIscE4813.pdf
the link will not work anymore because %20 get replaced with '_' . Here you can find a "working" example
https://culturaitaliana.org/wiki/Digital_libraries/Universit%C3%A0_degli_Studi_di_Torino,_Biblioteca_storica_di_ateneo_%22Arturo_Graf%22
field "Digital library digital resource example url"
This might be an unwanted effect of the following commit
#2201
The text was updated successfully, but these errors were encountered: