Last modified: 2007-12-28 21:49:08 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 T14437, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12437 - Urls to pages are not htmlspecialcharized
Urls to pages are not htmlspecialcharized
Status: RESOLVED DUPLICATE of bug 3097
Product: MediaWiki extensions
Classification: Unclassified
DynamicPageList2 (Other open bugs)
unspecified
PC All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-28 11:04 UTC by Alexander Obuhovich
Modified: 2007-12-28 21:49 UTC (History)
0 users

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


Attachments

Description Alexander Obuhovich 2007-12-28 11:04:54 UTC
When listing pages using DPL query and page_title in database is named like "test_&_test2" amp; is lost in name and link to not existing page is build.

Fix:
 if ($bEscapeLinks && ($pageNamespace==14 || $pageNamespace==6) ) {
	        // links to categories or images need an additional ":"
			$articleLink = '[[:'.htmlspecialchars($title->getPrefixedText()).'|'.htmlspecialchars( $wgContLang->convert( $sTitleText ) ).']]';
        } else {
			$articleLink = '[['.htmlspecialchars($title->getPrefixedText()).'|'.htmlspecialchars( $wgContLang->convert( $sTitleText ) ).']]';
		}
		$dplArticle->mLink = $articleLink;

This one of possible fixes: add htmlspecialchars call to name and url when building resulting wikitext.
Comment 1 Brion Vibber 2007-12-28 21:49:08 UTC
Duping this to bug 3097. With the illegal non-round-trippable titles now forbidden, round-tripping issues such as this become a non-issue.

*** This bug has been marked as a duplicate of bug 3097 ***

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


Navigation
Links