Last modified: 2011-10-02 16:51:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 18207 - Strange spacing before [[irc:...]] links
Strange spacing before [[irc:...]] links
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.15.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://meta.wikimedia.org/wiki/IRC/wi...
:
Depends on:
Blocks: css
  Show dependency treegraph
 
Reported: 2009-03-27 20:07 UTC by Mike.lifeguard
Modified: 2011-10-02 16:51 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
extra space before the link (27.24 KB, image/png)
2009-03-27 20:08 UTC, Mike.lifeguard
Details
more extra space before the link (29.43 KB, image/png)
2009-03-27 20:08 UTC, Mike.lifeguard
Details
No extra space here... these are external links: [irc://whatever... #channel] (37.29 KB, image/png)
2009-03-27 20:09 UTC, Mike.lifeguard
Details
proposed patch (315 bytes, patch)
2009-03-27 20:24 UTC, Ahmad Sherif
Details
patch per comment#5 (402 bytes, patch)
2009-04-30 21:49 UTC, Ahmad Sherif
Details
proposed patch (628 bytes, patch)
2009-05-02 07:55 UTC, Ahmad Sherif
Details

Description Mike.lifeguard 2009-03-27 20:07:59 UTC
Links to [[irc:Whatever|#whatever]] seem to have extra blank space (like a \qquad or something - but can't be highlighted) before the link. Doesn't affect other interwiki links. Seems not to affect normal external links to irc://...

This may be a browser thing (though I've not switched or upgraded recently & certainly wasn't the case previously) - I'm using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)
Comment 1 Mike.lifeguard 2009-03-27 20:08:37 UTC
Created attachment 5968 [details]
extra space before the link
Comment 2 Mike.lifeguard 2009-03-27 20:08:53 UTC
Created attachment 5969 [details]
more extra space before the link
Comment 3 Mike.lifeguard 2009-03-27 20:09:24 UTC
Created attachment 5970 [details]
No extra space here... these are external links: [irc://whatever... #channel]
Comment 4 Ahmad Sherif 2009-03-27 20:24:42 UTC
Created attachment 5971 [details]
proposed patch

Another follow up on bug 1061. This patch would help.
Comment 5 Brion Vibber 2009-04-30 21:12:21 UTC
Taking a peek.... patch doesn't look quite sufficient. In addition to IRC there may be other protocols which may match with the same styling issues.

There's also an entry which looks like it's attempting to entirely turn off the styling icons for interwikis:

/* disable interwiki styling */
#bodyContent a.extiw,
#bodyContent a.extiw:active {
	color: #36b;
	background: none;
	padding: 0;
}

It looks like the CSS override order rules are leaving at least the IRC link matching anyway on normal view (perhaps because of the explicit #bodyContent a.extiw[href ^="irc://"] rule), while when it's being clicked the #bodyContent a.extiw:active selector takes over and the padding and icon can be seen to disappear.

Perhaps removing that #bodyContent a.extiw[href ^="irc://"] selector would do the job better? Why's it even there?
Comment 6 Brion Vibber 2009-04-30 21:13:52 UTC
Adding a sample URL to the bug entry.
Comment 7 Ahmad Sherif 2009-04-30 21:49:09 UTC
Created attachment 6076 [details]
patch per comment#5

patch per comment#5
Comment 8 Danny B. 2009-05-01 10:32:47 UTC
The strange spacing is regression from r47615 where both side padding has been added instead of single-side, but has not been overriden back to single-side for .extiw class.

Fixed in r50102.
Comment 9 Ahmad Sherif 2009-05-01 11:06:58 UTC
(In reply to comment #8)
> The strange spacing is regression from r47615 where both side padding has been
> added instead of single-side, but has not been overriden back to single-side
> for .extiw class.
> 
> Fixed in r50102.
> 

This looks like my first obsolete patch which brion reviewed in c#5. As he indicated, when you click on the irc link, the icon will disappear.
Comment 10 Danny B. 2009-05-01 11:37:49 UTC
Removing /* disable interwiki styling */ section should solve the problem. (Why actually would we want interwikis to not be styled (= have icons nearby)?)

I'll look deeper a bit later on. For the time being I'd suggest to pull back r47615 which causes that.
Comment 11 Splarka 2009-05-01 11:52:34 UTC
Raising the specificity on the extiw rules (except the last) also seems to work, eg:

#bodyContent a[href ^="irc://"],
body #bodyContent a.extiw[href ^="irc://"],
.link-irc {
	background: url(discussionitem_icon.gif) center right no-repeat;
	padding: 0 18px;
}

.rtl #bodyContent a.external,
body.rtl #bodyContent a.extiw {
	background-position: left;
	padding-right: 0;
}

.ltr #bodyContent a.external,
body.ltr #bodyContent a.extiw {
	padding-left: 0;
}

Someone might pursue this line of inquiry, but I don't have the resources to test it
Comment 12 Ahmad Sherif 2009-05-01 12:30:11 UTC
(In reply to comment #10)
> I'll look deeper a bit later on. For the time being I'd suggest to pull back
> r47615 which causes that.
> 

r47615 only causes the spacing before the links, but the disappearance of the icon wouldn't change.
Comment 13 Brion Vibber 2009-05-01 23:50:14 UTC
r50102 is indeed the bad patch. Makes more sense to remove the selector which adds the icon and padding we apparently don't want in the first place...? Or if it was added deliberately, then it needs to be fixed to work consistently.
Comment 14 Ahmad Sherif 2009-05-02 07:55:42 UTC
Created attachment 6079 [details]
proposed patch

A more suitable patch against against r50121.
Comment 15 Tim Starling 2009-05-19 16:08:44 UTC
It seems to me that the bug could easily be fixed by disallowing interwiki prefixes which link to non-HTTP protocols. We've had trouble with this before, with js:, etc. Some protocols have security implications. There's a perfectly good way to link to the IRC protocol, there's no need to add interwiki prefixes.
Comment 16 Tim Starling 2009-06-04 08:50:49 UTC
Proposed fix in r51457.
Comment 17 Mike.lifeguard 2009-06-18 15:50:04 UTC
Looks fixed to me.
Comment 18 Derk-Jan Hartman 2011-10-02 16:51:11 UTC
Applied this to the other skins in r98690

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links