Last modified: 2012-04-16 09:15:43 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 T30538, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28538 - Wrong HTML when italics are mixed with quotes
Wrong HTML when italics are mixed with quotes
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-14 16:47 UTC by Helder
Modified: 2012-04-16 09:15 UTC (History)
2 users (show)

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


Attachments

Description Helder 2011-04-14 16:47:44 UTC
While editing [[Absorbing element]] I was expecting the equality
    ''z'' = ''z''*''z''' = ''z'''
to be rendered as
    <i>z</i> = <i>z</i> * <i>z</i>' = <i>z</i>'
and not as
    <i>z</i> = <i>z</i> * <i>z <b>=</b></i> <b>z</b>

The problem seems to be related to Bug 13227, but I'm not sure, so I'm reporting it in this new bug.

For now, I've changed the code to latex markup,
   <math>z = z*z' = z'</math>
, which works fine and if I choose the option "Recommended for modern browsers" in [[Special:Preferences#preftab-1]], the resulting HTML is the one I was expecting to get using wiki markup.
Comment 1 Platonides 2011-04-14 16:54:15 UTC
Well, ''' makes bold syntax so mediawiki translation seems right. Sometimes the intended behavior is not clear and one of the different possibilities has to be taken. You can force ''' as two '' (and thus italic) by marking one of them as &#19; or placing an empty comment or <nowiki> as separator.
Comment 2 Bawolff (Brian Wolff) 2011-04-14 17:05:34 UTC
I think you mean &#39; . &#19 is the control character DC3.

Hmm, seems as if mediawiki doesn't like &apos; , but that's a side issue
Comment 3 Helder 2011-04-14 17:38:40 UTC
(In reply to comment #1)
> Well, ''' makes bold syntax so mediawiki translation seems right. Sometimes the
> intended behavior is not clear and one of the different possibilities has to be
> taken. You can force ''' as two '' (and thus italic) by marking one of them as
> &#19; or placing an empty comment or <nowiki> as separator.

Ok, but where does that second <b> tag comes from when
''z''' = ''z'''
is converted to
<i>z <b>=</b></i> <b>z</b>
?

Note that there is only one sequence of ''' before the last z and there are two <b> before the same z.
Comment 4 Bawolff (Brian Wolff) 2011-04-14 17:46:18 UTC
''z''' = ''z'''

Is interpreted as [start italic] z [start bold] = [stop italic (but keep on being bold)] z [stop bold]

The second <b> is because mediawiki thinks you only want to stop the italic (not both italic and bolding), however in html you can't stop only the italic, you have to stop both and then re-start the bolding after the italic is stopped. (tags can't be mis-nested).

(In reply to comment #2)
> I think you mean &#39; . &#19 is the control character DC3.
> 
> Hmm, seems as if mediawiki doesn't like &apos; , but that's a side issue

Not that this is related to this bug at all really, but i fixed the &apos; thing in r86061
Comment 5 Helder 2011-04-14 18:16:04 UTC
(In reply to comment #4)
> ''z''' = ''z'''
> 
> Is interpreted as [start italic] z [start bold] = [stop italic (but keep on
> being bold)] z [stop bold]
> 
> The second <b> is because mediawiki thinks you only want to stop the italic
> (not both italic and bolding), however in html you can't stop only the italic,
> you have to stop both and then re-start the bolding after the italic is
> stopped. (tags can't be mis-nested).
Thanks for clafying.

I was thinking that the second '' was closing the first '' and also the first ''' implicitily (and then I was asking myself why the result was not like
<i>z <b>=</b></i> z<b></b>
)
Comment 6 Platonides 2011-04-14 23:18:26 UTC
I think that was the original coded behavior, but then tidy fixed things the other way, so it was changed to match the de facto solution that was rendered.
Comment 7 Bawolff (Brian Wolff) 2011-04-15 00:15:13 UTC
(In reply to comment #6)
> I think that was the original coded behavior, but then tidy fixed things the
> other way, so it was changed to match the de facto solution that was rendered.

I was actually testing without tidy. MediaWiki seems smart enough to fix that on its own.
Comment 8 Platonides 2011-04-18 21:20:52 UTC
Yes, now MediaWiki has that behavior, even without tidy, that's what was changed),

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


Navigation
Links