Last modified: 2014-09-24 01:24:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13454, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11454 - User list includes MediaWiki:Viewprevnext without rendering markup.
User list includes MediaWiki:Viewprevnext without rendering markup.
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.21.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n, patch
: 12100 (view as bug list)
Depends on:
Blocks: messages
  Show dependency treegraph
 
Reported: 2007-09-26 00:03 UTC by Mark Clements (HappyDog)
Modified: 2014-09-24 01:24 UTC (History)
5 users (show)

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


Attachments

Description Mark Clements (HappyDog) 2007-09-26 00:03:08 UTC
At MediaWiki.org, we have modified MediaWiki:Viewprevnext [1] so that the lists are more clearly delineated.  This works on all pages that use it (e.g. Special:Uncategorizedcategories [2]) except for the user list page [3].  On the other pages, the <span> tags are treated as HTML, as you would expect, but on the user list they are rendered as straight text.

Expected behaviour: The message should be treated in the same way by all pages that use it.

[1] http://www.mediawiki.org/wiki/MediaWiki:Viewprevnext
[2] http://www.mediawiki.org/wiki/Special:Uncategorizedcategories
[3] http://www.mediawiki.org/wiki/Special:Listusers
Comment 1 Mark Clements (HappyDog) 2007-09-26 00:06:54 UTC
btw - To save someone else the bother, I checked all the special pages and that was the only one that seemed to have a problem.
Comment 2 Mark Clements (HappyDog) 2007-09-27 01:19:22 UTC
Oops - I just noticed that Special:Categories [1] has the same problem.  Perhaps my checking was not as thorough as it should have been...

[1] http://www.mediawiki.org/w/index.php?title=Special:Categories
Comment 3 Mark Clements (HappyDog) 2007-11-06 00:21:38 UTC
As the wiki is active, and some special pages were broken by the test cases, the problem edit has been deleted at MediaWiki.org. I have instead reproduced the examples at test.wikipedia.org.  The links above should therefore be replaced with:

From the description:
[1] http://test.wikipedia.org/wiki/MediaWiki:Viewprevnext
[2] http://test.wikipedia.org/wiki/Special:Uncategorizedcategories
[3] http://test.wikipedia.org/wiki/Special:Listusers

From comment 2:
[1] http://test.wikipedia.org/w/index.php?title=Special:Categories

(note that some of the above pages are cached, and so may not reflect the modifications until their next update)
Comment 4 Lejonel 2007-11-25 15:07:23 UTC
*** Bug 12100 has been marked as a duplicate of this bug. ***
Comment 5 Brion Vibber 2007-12-03 21:15:01 UTC
All uses of viewprevnext should be escaped properly for output as plaintext with generated links. The ones that are currently passing through raw HTML are incorrect and need to be fixed.

It may be appropriate to automatically wrap a <div> with a class around it, though.
Comment 6 Mark Clements (HappyDog) 2008-08-04 05:36:30 UTC
Definitely needs a classed DIV tag, along with the fix for consistency - currently it is impossible to style this element.
Comment 7 aliter 2008-10-02 19:39:23 UTC
I expect  Wiki:WhatLinksHere  would be another page with this problem. At least, we're seeing
"(foargeande 50) (folgjende 50) besjen.&gt;br&lt; (20 | 50 | 100 | 250 | 500)", rather than
"(foargeande 50) (folgjende 50) besjen.<br> (20 | 50 | 100 | 250 | 500)".
Comment 8 aliter 2008-10-02 19:42:02 UTC
Sorry, I don't have documentation for MediaZilla, so I had to guess whether it would interpret the input one level. Given the look of being a MediaWiki I assumed "yes", and it turns out to be "no". Here we go again:

I expect  Wiki:WhatLinksHere  would be another page with this problem. At
least, we're seeing
"(foargeande 50) (folgjende 50) besjen.<br> (20 | 50 | 100 | 250 | 500)",
rather than
"(foargeande 50) (folgjende 50) besjen.
(20 | 50 | 100 | 250 | 500)".
Comment 9 Luis Felipe Schenone 2013-01-25 13:13:15 UTC
I looked around and the bug seems to be fixed now. Am I right? Should we close this bug?
Comment 10 Andre Klapper 2013-01-28 11:21:33 UTC
Luis: Thanks for th heads-up!

(In reply to comment #0)
> At MediaWiki.org, we have modified MediaWiki:Viewprevnext [1] so that the
> lists
> are more clearly delineated.

Page does not exist anymore, hence nowadays hard to understand what the modification was. Closing as RESOLVED WORKSFORME for the time being.
Comment 11 Mark Clements (HappyDog) 2013-01-28 12:23:54 UTC
This is not resolved, as far as I can see.

The original issue reported was:
* Most pages (e.g. Special:UncategorizedCategories) output MediaWiki:Viewprevnext message as raw HTML.
* Some pages, such as Special:ListUsers escape this message before outputting it.
* Any page that escapes the message should be updated to output it as raw HTML.
* The impetus for this is that on MediaWiki.org we want to apply styling to the message and whilst this works on most pages, on the ListUsers page the <span> that we wrap the output in is escaped, and so is visible on the page.

Since this bug was logged two things have happened:
1) It has been stated that this is intentional behaviour, and that the message should always be escaped.
2) The test case which demonstrated the problem has been removed from test.wikipedia.org.  (Here is a link to the deleted version: http://test.wikipedia.org/w/index.php?title=MediaWiki:Viewprevnext&action=edit&oldid=28703).  Splarka's comment in the edit history ("sick of people reporting this") implies that this is a relatively common issue, and therefore something that should be resolved one way or another.

So therefore we need to update the bug report as follows:
* Most pages (e.g. Special:UncategorizedCategories) output MediaWiki:Viewprevnext message as raw HTML.
* Some pages, such as Special:ListUsers escape this message before outputting it.
* Any page that *doesn't* escape this message should be updated so that it does, for consistency (this may or may not have been done - hard to tell - and possibly it should be a separate bug).
* Whenever MW outputs this message it should always be wrapped in a <span> tag with an appropriate class, so that it is possible to style it in a meaningful way.
Comment 12 Andrey Kiselev 2013-04-25 10:59:20 UTC
Bug in Language.php: function viewPrevNext. 

# Make 'next' link
$next = wfMessage( 'nextn' )->inLanguage( $this )->title( $title )->numParams( $limit )->text();
if ( $atend ) {
	$nlink = htmlspecialchars( $next );
} else {
	$nlink = $this->numLink( $title, $offset + $limit, $limit,
		$query, $next, 'prevn-title', 'mw-nextlink' );
}

Should be 
	$nlink = $this->numLink( $title, $offset + $limit, $limit,
		$query, $next, 'nextn-title', 'mw-nextlink' );
Comment 13 Alex Monk 2013-04-25 19:54:33 UTC
Andrey, would you like to create a Gerrit account and put that patch in Gerrit?
Comment 14 Andrey Kiselev 2013-04-25 20:23:18 UTC
Alex, I would like, but I don't know how to do it.
Comment 15 Alex Monk 2013-04-25 21:48:19 UTC
You might want to have a look at https://www.mediawiki.org/wiki/Gerrit/Tutorial
Comment 16 Sumana Harihareswara 2013-04-25 22:06:41 UTC
Andrey, thank you for offering to help! If you need additional help in order to put your change into our source code, you can talk with us in our 24-hour chat channel, #mediawiki on Freenode IRC. More information: https://www.mediawiki.org/wiki/MediaWiki_on_IRC
Comment 17 Andre Klapper 2013-09-19 11:43:37 UTC
Andrey: Are you still up to try getting your patch into the code review system? Did you receive some help on IRC?

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


Navigation
Links