Blahma updated the task description. (Show Details)

CHANGES TO TASK DESCRIPTION
Page.title(asUrl=True) currently does not encode the slash character, because that is a default exception in the underlying quote_from_bytes.

Unencoded slashes that are part of page title (e.g. "A/B_testing") are not a problem in Wikipedia article URLs, but it breaks the REST API that makes extensive use of the slash to separate its arguments. Accessing https://en.wikipedia.org/api/rest_v1/page/html/A/B_testing results in an error, while https://en.wikipedia.org/api/rest_v1/page/html/A%2FB_testing works as expected.

On the other hand, I have not identified any case in which escaping a slash in page title embeded in a URL would break existing functionality.

Therefore I suggest removing the slash character from the exception list, basically by adding safe='' as quote_from_bytes' second argument
.

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

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

To: Blahma
Cc: Aklapper, pywikibot-bugs-list, Blahma, Magul, Tbscho, rafidaslam, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to