Page MenuHomePhabricator

Extraneous whitespace in attributes
Open, NormalPublic

Description

Some attribute have extra whitespace at the beginning or the end of attribute values. These tend to come from templates adding comments, but the PHP parser suppresses the extra whitespace. I think it would be nice if Parsoid trimmed the attribute values, too.

Extra spaces at the end of reflist class and beginning of style attribute in example from view-source:https://en.wikipedia.org/api/rest_v1/page/html/Cat

<h2 id="Notes">Notes</h2>
<div class="reflist " style=" list-style-type: decimal;"

No extra spaces in equivalent snippet from PHP parser (view-source:https://en.wikipedia.org/wiki/Cat)

<h2><span class="mw-headline" id="Notes">Notes</span></h2>
<div class="reflist" style="list-style-type: decimal;">

Event Timeline

bearND created this task.Sep 28 2018, 6:47 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 28 2018, 6:47 PM

Maybe related to T53003?

ssastry triaged this task as Normal priority.Sep 28 2018, 8:15 PM