Page MenuHomePhabricator

  causes HTML tags to close unexpectedly (when using tidy)
Closed, ResolvedPublic

Description

Consider this:

:'''Bold in wikimarkup with <b>(embedded bold)</b> in HTML'''
:'''Bold in wikimarkup with &nbsp;<b>(embedded bold preceded by &amp;nbsp;)</b> in HTML'''

The first line will display correctly in all bold, the second will *close* the embedded bold whenever there is a &nbsp anywhere before it. This happens with all HTML tags.


Version: 1.17.x
Severity: normal
URL: http://Template talk:·#Bolding embedding test

Details

Reference
bz26516

Event Timeline

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

Works fine when tidy is disabled, so tidy issue.

In that case, Tidy should be set to ignore &nbsp;.

Is this still an issue? however since there is at least a workaround I am changing priority. It works for me ok

(In reply to comment #3)

Is this still an issue? however since there is at least a workaround I am
changing priority. It works for me ok

Disabling tidy isn't really a viable work around. (Not double embedding bold otoh is a good work around ;)

Someone should probably get around to filing all these tidy bugs upstream, since no one at this bugtracker works on tidy, so it's unlikely that these bugs will ever get fixed here.

Why was this closed invalid? Please include a reason when closing bugs.

Because, as you said, this needs to be fixed in Tidy, not in MediaWiki.

Generally in such cases we keep the bug report open and link to the bug in the upstream tracker (and add the upstream keyword)

Note that while first line will display correctly in all bold, the second will *close* the embedded bold whenever there is a &nbsp anywhere before it. This happens with all HTML tags:

:'''Bold in wikimarkup with <b>(embedded bold)</b> in HTML'''
:'''Bold in wikimarkup with &nbsp;<b>(embedded bold preceded by &amp;nbsp;)</b> in HTML'''

:'''Bold in wikimarkup with <b>&nbsp;(embedded bold preceded by &amp;nbsp;)</b> in HTML'''

This third line displays correctly in all bold.

Izno claimed this task.
Izno subscribed.

Fixed with Remex.