Page MenuHomePhabricator

Cite: when using "group=" attribute within "ref" element the space can cause line-break
Closed, ResolvedPublic

Description

Author: bburette

Description:
Hi,

I recently added a " <ref>" tag in a wikipedia article using the "group=" attribute. After saving the page my browser (Firefox) showed the group name at the end of a line and the number at the beginning of the next line!

Looking at the code I think the bug is located in file "Cite_body.php" in function "linkRef" where line 570 looks like

($group == CITEDEFAULT_GROUP)?'':"$group ").$wgCont....

The space that is added to the group name is a whitespace character in HTML so line-breaking can happen there.

Maybe using a non-breaking space like U+00A0 or U+202F or maybe no space at all would be more appropriate?

Thanks!


Version: unspecified
Severity: normal
Whiteboard: aklapper-moreinfo

Details

Reference
bz19303

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:43 PM
bzimport added a project: Cite.
bzimport set Reference to bz19303.
bzimport added a subscriber: Unknown Object (MLST).

Is this still an issue? If so, can we get a concrete example?

Bernard: Is this still an issue? If so, can we get a concrete example?

Bub_s claimed this task.

Hi,

It no longer is a problem, at least on french Wikipedia displayed with skin Vector.

I just tested and no line-break happens. This comes from the CSS style "sup.reference" from page "load.php" which adds "white-space:nowrap" to that text. The character used between the reference number and the group name is still a white space but no line-break can occur anymore.

Since the "load.php" depends on both the language and the skin I cannot be sure for all combinations but I assume this could easilly be fixed anyway.

I suggest closing this task.
Best regards.