Page MenuHomePhabricator

Feature: Cosmetic Edit function
Open, Needs TriagePublic


Sometimes simple cleanup tasks are cosmetic ie. not strictly required, but nice to have done at some point. Cosmetic edits are included only when other edits are done at the same time.

This is a request for a Cosmetic Edit task to remove the trailing "#" from archiveurl and url fields - the later only if it's also in the archiveurl. This will reduce complexity in the source data, reduce chances of future problems with other tools and services, bring the URLs back to normal.

Event Timeline

Restricted Application assigned this task to Cyberpower678. · View Herald TranscriptDec 2 2018, 6:51 PM
Green_Cardamom added a comment.EditedJan 5 2019, 6:32 PM

An example of an unintended side effect with the trailing "#" is with

In this diff:

This URL was saved at

In order to retrieve the URL one must do

This is because converts the "#" into a literal encoded character that is part of the URL not a special reserved character indicating a fragment.

Thus all the URLs with trailing "#" that are being saved at can only be discovered there by adding a "%23" to the end of the URL.

Green_Cardamom added a comment.EditedFeb 24 2019, 12:34 AM

Cosmetic function:

Convert, .fo, .li, .vn, .md, .ph


It is not necessary to function, but could be one day, and the site prefers we use .today

Idea is chip away at conversion now to mitigate a possible large/emergency conversion later.

I'm a little confused. The blank # should automatically clean out if the URL gets processed again. This is because it detaches the fragment internally, and if it's empty, will not re-attach it. As for the converting the domains of archiveis, I believe this is forced on enwiki.

Green_Cardamom added a comment.EditedMar 7 2019, 10:57 PM

This is for preexisting links in wikisource. The edit occurs in wikisource. Wikisource is loaded with links that should be converted to - likewise many articles contain URLs that end in # due to the old bug.

Wikisource? Does IABot even edit there. I thought it edits Wiktionary.

For example, if an article contains the following:

<ref>{{cite web |url= |archiveurl= |archivedate=2019-02-02 |deadurl=yes}}</ref>

IABot arrives and it sees it, but normally does nothing because there is nothing to do. The citation is correct, the archive URL and date are correct, etc.. However with this cosmetic function, it would make an edit so that the article now contains:

<ref>{{cite web |url= |archiveurl=}}</ref>

It would modify the article (the wiki source code, the wiki markup, whatever it is called). Edit the article such that is now

IABot should already do that. It's a part of the normalization function which is enabled on enwiki.

No it does not normalize URLs to as in the above example.

It will only normalize when converting from short-form to long-form.