Last modified: 2013-07-07 00:02:24 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 T46452, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44452 - Spurious pre in http://en.wikipedia.org/wiki/Jonestown,_Texas
Spurious pre in http://en.wikipedia.org/wiki/Jonestown,_Texas
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
token-stream transforms (Other open bugs)
unspecified
All All
: Low normal
: ---
Assigned To: Gabriel Wicke
:
: 50069 50580 50640 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-29 01:24 UTC by Gabriel Wicke
Modified: 2013-07-07 00:02 UTC (History)
5 users (show)

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


Attachments

Description Gabriel Wicke 2013-01-29 01:24:03 UTC
The following template in http://en.wikipedia.org/wiki/Jonestown,_Texas expands with a spurious indent pre:

{{unreferenced section|date=May 2011}}
Comment 1 Gabriel Wicke 2013-06-29 02:11:30 UTC
Pretty rare and can very likely be worked around by fixing the template. Lowering priority for now.
Comment 2 Gabriel Wicke 2013-07-02 14:59:05 UTC
*** Bug 50580 has been marked as a duplicate of this bug. ***
Comment 3 ssastry 2013-07-03 20:34:24 UTC
This is caused by inconsistent (in my view) PHP parser behavior while handling indent-pres in tables.  See example below:

{|
| This
  generates an indent-pre
|}

<table><tr>
<td>This
  does not generate an indent-pre
</td></tr></table>


However, Parsoid currently introduces indent-pres in both cases.

The template https://en.wikipedia.org/w/index.php?title=Template:Unreferenced_section&oldid=528729873&action=edit
does not introduce an indent-pre because of this inconsistency. 

A reasonable fix in this case might be to remove the newline after |section in the above template.
Comment 4 ssastry 2013-07-03 20:40:51 UTC
A more reasonable default behavior might be not to generate indent-pres in table-cells at all, since there are at least 2 scenarios currently where leading whitespace in table-cells doesn't result in indent-pres.  See below.

1. Indent-pre:

{|
|-
|
 foo
|}

2. No indent-pre:

{|
|-
 foo
|}

3. No indent-pre:

<table><tr><td>
 foo
</td></tr></table>

However, not sure if there are pages out there that exploit behavior 1.
Comment 5 ssastry 2013-07-03 20:58:17 UTC
James fixed the template. I verified that it is fixed locally. Now, we just wait for cached html to be purged for all dependent pages. At some point, worth considering the <pre> in td-cells issue and see if we should change that behavior.  For now, closing.
Comment 6 James Forrester 2013-07-05 17:02:31 UTC
*** Bug 50640 has been marked as a duplicate of this bug. ***
Comment 7 ssastry 2013-07-05 17:15:27 UTC
At this time, the last remaining issue is that cached HTML didn't get purged when the template was updated.  If we are in a rush, we could simply get Roan to purge the caches and it will get fixed.  The page in bug 50640 works for me (for some reason different from the screenshot that Oliver sees).
Comment 8 James Forrester 2013-07-07 00:02:24 UTC
*** Bug 50069 has been marked as a duplicate of this bug. ***

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


Navigation
Links