Last modified: 2012-07-24 11:10:22 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 T7437, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5437 - Bold and italic render as apostrophes when wrapping an HTML comment
Bold and italic render as apostrophes when wrapping an HTML comment
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.6.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
http://de.wikipedia.org/wiki/Benutzer...
: parser
Depends on:
Blocks:
  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: ---


Attachments

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. 

Example:
''' ''' 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
http://de.wikipedia.org/w/index.php?title=Prison_Break&oldid=15297064 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:

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

as:

''''''      // 6 quotes
''''''      // 6 quotes
''''''''''  // 10 quotes

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:

'<b></b>
'<b></b>
'''''<b></b>

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 
<pre>
...something ''''C'''' 
to
...something''' 'C'''' 
</pre>
made in 4-6 places. An true ascii diff utility will show those. 

Diff:[http://en.wikipedia.org/w/index.php?title=Template%3ACommons-gallery&diff=112418474&oldid=112417275
 this]

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.

Text:
'''<!-- -->'''

Parse result:
<p>'
</p>

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.


Navigation
Links