Last modified: 2012-07-24 11:10:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 5437 - Bold and italic render as apostrophes when wrapping an HTML comment
Bold and italic render as apostrophes when wrapping an HTML comment
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
  Show dependency treegraph
Reported: 2006-04-03 10:01 UTC by Stefan Bauer
Modified: 2012-07-24 11:10 UTC (History)
2 users (show)

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


Description Stefan Bauer 2006-04-03 10:01:22 UTC
When a html comment is tagged with apostrophes as bold or italic then the parser
should deliver no visible character, but an apostoph is delivered. 

''' ''' is parsed correct

'''''' is parsed as '
'''<!-- -->''' is parsed as '
'''''<!-- -->''''' is parsed as '''''

This construct is hardly ever used in plain wiki source code but it is easily
created by the use of templates (see for
example - the apostroph in the first line of the infobox should not be there).
Comment 1 Antoine "hashar" Musso (WMF) 2006-04-25 20:09:06 UTC
This is hard to fix cause we strip comments before parsing quotes.
So doQuotes() see:

'''<!-- -->'''
'''''<!-- -->'''''



We only consider the first five quotes and assumes everything before is
meant to be text. So 5 consecutive quotes are rendered as <b></b>
and the parser render above text as:


Which is "correct".

A possibility would be to actually render comments as HTML comments,
but that can possibly be a lot of work for little reward. I would say
WONTFIX this bug and let user add a space before or after the comment
block so they can fix the bug by themselves :)

Comment 2 Frank Bartus 2007-03-03 22:36:21 UTC
This seems like it's related... See the two source pages, especially the lowest
section, and look at the leading scare quotes. The diff, has whitespace
compression distorting the work around I employed. Basically 
...something ''''C'''' 
...something''' 'C'''' 
made in 4-6 places. An true ascii diff utility will show those. 


NOTE: this is contrary to the published way the four single quotes are supposed
(and USED TO) work.

Best regards // ~~~~

P.S. Ad hoc feature suggestion... this page needs a preview screen. Would be
really nice to have one in Wiki-email facility too. 

P.P.S. -- Just one thought... spaces before and after comments not infrequently
break things... that good old wonderful grey box kind of break. In particular in
doing template coding. Why not parse six and render <nowiki><b><i>'</nowiki>...
you can't be parsing that many pages with five or six single quotes!
Comment 3 matanya 2012-07-24 11:05:29 UTC
works fine here.
Comment 4 Antoine "hashar" Musso (WMF) 2012-07-24 11:08:40 UTC
Still has the issue.

'''<!-- -->'''

Parse result:

I believe the request is to have it render as:  <b></b>

Might be a wont fix though.
Comment 5 matanya 2012-07-24 11:10:22 UTC
oh, missed the ! part. yes, still a bug.

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