Last modified: 2013-07-04 10:33:14 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="{"dsr":[0,22,0,0]}"><b data-parsoid="{"autoInsertedEnd":1,"tsr":[0,3],"dsr":[0,15,3,0],"src":"”'foo {{Test}}"}" about="#mwt1" typeof="mw:Object/Template" data-mw="{"parts":["”'foo ",{"template":{"target":{"wt":"Test"},"params":{}}}]}">foo </b><span about="#mwt1"></span><span style="color:green" data-parsoid="{"stx":"html"}" about="#mwt1">HELLO! {{{0}}}</span> bar<b data-parsoid="{"autoInsertedEnd":1,"tsr":[19,22],"dsr":[19,22,3,0]}"></b></p>
Our output (with PHP preprocessor enabled, as usual) looks ok to me: <p data-parsoid="{"dsr":[0,24,0,0]}"><b data-parsoid="{"tsr":[0,3],"dsr":[0,24,3,3]}">foo <span style="color:green" data-parsoid="{"tsr":[7,17],"src":"{{Inline}}","dsr":[7,17,null,null]}" about="#mwt2" typeof="mw:Object/Template" data-mw="{"target":{"wt":"Inline"},"params":{}}">HELLO! {{{0}}}</span> bar</b></p>
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)
(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.
[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]