Nikki created this task.
Nikki added a project: Wikidata.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  Wikibase should decode percent-encoded URLs in statements when displaying 
them, similar to what was done for the query service in T327514 
<https://phabricator.wikimedia.org/T327514>.
  
  Browsers typically display an unencoded URL in the address bar but use the 
percent-encoded form when the copying URLs. Storing URLs unencoded can also be 
problematic, e.g. applying Unicode normalisation can break the URL, like 
reported in T206188 <https://phabricator.wikimedia.org/T206188>.
  
  But when a URL contains a lot of non-ASCII characters, it creates very long, 
unreadable URLs, which people understandably don't like and sometimes try to 
avoid.
  
  Decoding them when displaying them would make them more readable while still 
being able to store them in the encoded form.
  
  The example from T206188 <https://phabricator.wikimedia.org/T206188> 
(https://www.wikidata.org/w/index.php?oldid=756586516):
  
  - Not encoded: 
https://www.ebanglalibrary.com/bangladictionary/অশোক-চট্টোপাধ্যায়/
  - Encoded: 
https://www.ebanglalibrary.com/bangladictionary/%E0%A6%85%E0%A6%B6%E0%A7%8B%E0%A6%95-%E0%A6%9A%E0%A6%9F%E0%A7%8D%E0%A6%9F%E0%A7%8B%E0%A6%AA%E0%A6%BE%E0%A6%A7%E0%A7%8D%E0%A6%AF%E0%A6%BE%E0%A7%9F/
  
  How it currently appears:
  F42023042: Bildschirmfoto_2024-02-21_16-05-30.png 
<https://phabricator.wikimedia.org/F42023042>
  
  How it appears after decoding the URL:
  F42023046: Bildschirmfoto_2024-02-21_16-05-55.png 
<https://phabricator.wikimedia.org/F42023046>
  
  I used the following bit of code in the browser console to change the link 
text (I didn't check whether the decoded URL is valid UTF-8):
  
    for (let e of document.querySelectorAll("a.external")) {
        if (e.textContent === e.href) {
                e.textContent = decodeURI(e.textContent);
        }
    }

TASK DETAIL
  https://phabricator.wikimedia.org/T358114

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Nikki
Cc: Nikki, Aklapper, Danny_Benjafield_WMDE, Astuthiodit_1, karapayneWMDE, 
Invadibot, maantietaja, ItamarWMDE, Akuckartz, Nandana, Lahi, Gq86, 
GoranSMilovanovic, QZanden, KimKelting, LawExplorer, _jensen, rosalieper, 
Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to