Last modified: 2013-07-04 10:33:14 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 T50516, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48516 - Template wrongly closes <b> tag and marks it as template-affected
Template wrongly closes <b> tag and marks it as template-affected
Status: RESOLVED INVALID
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-15 18:51 UTC by Roan Kattouw
Modified: 2013-07-04 10:33 UTC (History)
2 users (show)

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


Attachments

Description Roan Kattouw 2013-05-15 18:51:41 UTC
Create Template:Test with the following content:

<span style="color:green">HELLO! {{{0}}}</span>

Create a page with the following content:

'''foo {{Test}} bar'''


MW correctly renders this as <p><b>foo <span style="color: green;">HELLO! {{{0}}}</span> bar</b></p>

Parsoid renders this incorrectly as roughly <p><b typeof="mw:Object/Template" about="#mwt1">foo </b><span about="#mwt1"></span><span style="color: green;" about="#mwt1">HELLO! {{{0}}}</span> bar<b></b></p>

Full Parsoid output with data attributes:

<p data-parsoid="{&quot;dsr&quot;:[0,22,0,0]}"><b data-parsoid="{&quot;autoInsertedEnd&quot;:1,&quot;tsr&quot;:[0,3],&quot;dsr&quot;:[0,15,3,0],&quot;src&quot;:&quot;”'foo {{Test}}&quot;}" about="#mwt1" typeof="mw:Object/Template" data-mw="{&quot;parts&quot;:[&quot;”'foo &quot;,{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;Test&quot;},&quot;params&quot;:{}}}]}">foo </b><span about="#mwt1"></span><span style="color:green" data-parsoid="{&quot;stx&quot;:&quot;html&quot;}" about="#mwt1">HELLO! {{{0}}}</span> bar<b data-parsoid="{&quot;autoInsertedEnd&quot;:1,&quot;tsr&quot;:[19,22],&quot;dsr&quot;:[19,22,3,0]}"></b></p>
Comment 1 Gabriel Wicke 2013-05-15 18:59:23 UTC
Our output (with PHP preprocessor enabled, as usual) looks ok to me:

<p data-parsoid="{&quot;dsr&quot;:[0,24,0,0]}"><b data-parsoid="{&quot;tsr&quot;:[0,3],&quot;dsr&quot;:[0,24,3,3]}">foo <span style="color:green" data-parsoid="{&quot;tsr&quot;:[7,17],&quot;src&quot;:&quot;{{Inline}}&quot;,&quot;dsr&quot;:[7,17,null,null]}" about="#mwt2" typeof="mw:Object/Template" data-mw="{&quot;target&quot;:{&quot;wt&quot;:&quot;Inline&quot;},&quot;params&quot;:{}}">HELLO! {{{0}}}</span> bar</b></p>
Comment 2 Roan Kattouw 2013-05-15 19:08:23 UTC
Yup, it does seem to work with the PHP preprocessor enabled. Looks like we observed this bug because:

* it's broken with the PHP preprocessor disabled (which is fine)
* localsettings.js.example falsely claims the preprocessor is enabled by default (which doesn't seem to be true, because setting usePHPPreProcessor = true fixed it)
Comment 3 Roan Kattouw 2013-05-15 19:12:31 UTC
(In reply to comment #2)
> Yup, it does seem to work with the PHP preprocessor enabled. Looks like we
> observed this bug because:
> 
> * it's broken with the PHP preprocessor disabled (which is fine)
> * localsettings.js.example falsely claims the preprocessor is enabled by
> default (which doesn't seem to be true, because setting usePHPPreProcessor =
> true fixed it)
Never mind, Trevor's laptop is clearly affected by cosmic rays or something.
Comment 4 Andre Klapper 2013-07-04 10:33:14 UTC
[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]

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


Navigation
Links