Page MenuHomePhabricator

ISBN in image description generates invalid HTML
Closed, ResolvedPublic

Description

Author: blackchar

Description:
Basically MediaWiki generates an <A HREF...> link
for the ISBN leading to a "special" page. This
link is retained as part of the image alt-text
(created based on the description). Of course,
having a link inside ALT attribute is not
healthy. Some HTML code spills out of the tag
onto the page.

You can see the problem at the link provided with
this bug entry (I saw it in Opera 8, but I guess
most browsers should work the same here).


Version: unspecified
Severity: minor
URL: http://en.wikipedia.org/w/index.php?title=Lolicon&oldid=9833382

Details

Reference
bz1442
TitleReferenceAuthorSource BranchDest Branch
Update Zotero translators to f88a29brepos/mediawiki/services/zotero-translators!5mvolzwork/mvolz/updatemain
Add proxies, tunnels API endpoints to ipoid servicerepos/mediawiki/services/ipoid!49tsepothoabalaT344273-add-endpointsmain
Implement batched import of db updatesrepos/mediawiki/services/ipoid!45stranbatch-importmain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:08 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz1442.
bzimport added a subscriber: Unknown Object (MLST).

We should not use such offensive languages here.

dunc_harris wrote:

It is easy not to include ISBNs in image captions.

avarab wrote:

The problem is that Parser::magicISBN() is called after Linker::makeThumbLinkObj
has been run on the text, which means that the magicISBN function will expand on
any ISBN number it recognizes, including those inside XHTML tags like alt="" or
title="".

rowan.collins wrote:

(In reply to comment #3)

The problem is that Parser::magicISBN() is called after Linker::makeThumbLinkObj
has been run on the text, which means that the magicISBN function will expand on
any ISBN number it recognizes, including those inside XHTML tags like alt="" or
title="".

In that case, it should be possible to do things the other way round, since the
image code should strip the HTML tags back out of the alt/title attributes. Kind
of ugly, but I think it might work.

avarab wrote:

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