https://bugzilla.wikimedia.org/show_bug.cgi?id=66749

--- Comment #4 from Roan Kattouw <[email protected]> ---
What Gabriel points out in comment 2 is exactly the same as bug 63642. The DOM
I get from <p>'''foo[[File:Image.jpg|thumb|caption]]bar''' looks like
<p><b>foo</b></p><figure><b><a><img
/></a><figcaption>caption</figcaption></b></figure><p><b>bar</b></p>

(In reply to C. Scott Ananian from comment #1)
> Not sure this is a bug:
> 
> > div = document.createElement('div')
> <div>​</div>​
> > div.innerHTML="<b><figure></figure></b>"
> "<b><figure></figure></b>"
> > div.outerHTML
> "<div><b><figure></figure></b></div>"
> > div.innerHTML="<b><div></div></b>"
> "<b><div></div></b>"
> > div.outerHTML
> "<div><b><div></div></b></div>"
> 
> Note that HTML5 is perfectly happy to let the block element live inside the
> <b> tag.
Yeah, HTML lets you do it, but I don't think it's very sensible, and VE doesn't
like it. I also see no reason why the behavior should be radically different
depending on whether Parsoid has decided that the text is in a paragraph or
free text. In the paragraph case, the bold tag is interrupted (and reapplied
inside the figure, but that's bug 63642; really it should be reapplied in the
caption instead, or not at all) and the figure isn't bolded, but in the free
text case the figure is bolded. Given that the distinction between free text
and paragraph text is pretty arbitrary, I don't think this makes much sense.

Speaking of, this paragraph vs free text stuff is also pretty broken. The
following wikitext:

'''foo[[File:Image.jpg|thumb|caption]]bar'''

'''foo[[File:Image.jpg|thumb|caption]]bar'''

produces a DOM that looks like  <body><b>foo<figure><a><img
/></a></figure>bar</b>\n\n<b>foo<figure><a><img /></a></figure>bar</b></body>
which is wrong: bar and foo will be on the same line but shouldn't be.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to