RFC magic highlighting should not happen within [links]
Closed, ResolvedPublic

Assigned To
None
Priority
Low
Author
bzimport
Subscribers
CesarB, wikibugs-l
Projects
Reference
bz1344
Description

Author: colin.pitts

Description:
Currently, MediaWiki's parser.php contains the special function magicRFC(),
which transforms raw text containing 'RFC' followed by a number into a link
specified by MediaWiki:Rfcurl.

This complicates parsing for a relatively rare case, and should be removed.

The functionality could be replaced by the existing RFC InterWiki map entry.
This would require a substitution script to be run across existing databases to
update current links.


Version: 1.4.x
Severity: minor

bzimport added a project: MediaWiki-Parser.Via ConduitNov 21 2014, 8:10 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz1344.
bzimport created this task.Via LegacyJan 16 2005, 7:54 PM
Dcljr added a comment.Via ConduitMay 29 2005, 2:40 AM

Here's an example at the English Wikipedia: http://en.wikipedia.org/wiki/RFC_3377

In case someone changes the page, here's the relevant part (called by the
template {{Compu-network-stub}}):

''This [[computer network]]-related article is a [[Wikipedia:Perfect stub

article|stub]].

[[Wikipedia:Find or fix a stub|Help]] Wikipedia by
[{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} expanding it]''

Since RFC's are autolinked, this is rendered on-screen like this:

This computer network-related article is a stub. Help Wikipedia by
RFC 3377&action=edit">expanding it.

The text "RFC 3777" is linked to:

http://en.wikipedia.org/w/index.php?title=RFC_3377&action=edit

and so actually works (in Windows Firefox 1.0 and IE 5.5, anyway), but a check
of the HTML source reveals a little more about what's happening:

by <a href="http://en.wikipedia.org/w/index.php?title=RFC_3377&amp;action=edit"
class='external'
title="http://en.wikipedia.org/w/index.php?title=&lt;ahref='http://www.ietf.org/rfc/rfc3377.txt'
class='external' title=">RFC 3377</a>&amp;action=edit"&gt;expanding it

I hope that gets displayed correctly when I save this comment! Anyway, the
software is still trying to autolink the RFC to the page at ietf.org, as it
would if you just had the string "RFC 3377" in running text. But obviously it
shouldn't be doing that since it's inside of a URL.

Dcljr added a comment.Via ConduitMay 29 2005, 2:47 AM

Note: As far as I can tell, the HTML source shown above is correct.

bzimport added a comment.Via ConduitAug 6 2005, 1:20 PM

chrislb wrote:

ISBN passages are also highlighted. Generaly software shouldn't be to intelligent here, as it
can complicate text editing. Could be integrated with some thing a la {{isbn|...}}.

bzimport added a comment.Via ConduitSep 13 2005, 11:15 PM

zigger wrote:

*** Bug 3415 has been marked as a duplicate of this bug. ***

bzimport added a comment.Via ConduitSep 13 2005, 11:18 PM

zigger wrote:

(In reply to comment #1)

...
Since RFC's are autolinked, this is rendered on-screen like this:

This computer network-related article is a stub. Help Wikipedia by
RFC 3377&action=edit">expanding it.

...

This problem has been reported as bug 3415.

bzimport added a comment.Via ConduitDec 30 2005, 4:10 AM

jra wrote:

This bug also surfaces when one tries to force a single-bracket out-link around
an RFC NNNN text string: the result is a null-text link pointing to the
specified site, followed by the magic link as usual.

EG: [http://baylink.pitas.com RFC 2100]

The required workaround is currently [http://baylink.pitas.com <nowiki>RFC
2100</nowiki>]; thanks to robchurch@IRC for suggesting it. This is indeed a low
priority bug, but if anyone's crawling around inside the parser... :-)

But it's not an RFE; it's a bug. Changing severity.

bzimport added a comment.Via ConduitDec 30 2005, 4:54 AM

robchur wrote:

(In reply to comment #6)

but if anyone's crawling around inside the parser...

...then I pity their eternal soul ;-)

bzimport added a comment.Via ConduitAug 16 2006, 6:29 AM

wmahan_04 wrote:

Parser test cases

It looks like Tim Starling fixed the problems in r15976. Here are a couple of
parser test cases for this and bug 3415 (both pass).

Attached: 1344.diff

bzimport added a comment.Via ConduitAug 17 2006, 10:33 PM

ayg wrote:

*** Bug 3415 has been marked as a duplicate of this bug. ***

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.